Mcp25xxx Class

Definition

A general purpose driver for the Microchip MCP25 CAN controller device family.

public abstract class Mcp25xxx : IDisposable
type Mcp25xxx = class
    interface IDisposable
Public MustInherit Class Mcp25xxx
Implements IDisposable
Inheritance
Mcp25xxx
Derived
Implements

Constructors

Mcp25xxx(SpiDevice, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, GpioController)
Mcp25xxx(SpiDevice, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, GpioController, Boolean)

A general purpose driver for the Microchip MCP25 CAN controller device family.

Properties

InterruptPin

Reads the current value of Interrupt pin.

ResetPin

Writes a value to Reset pin.

Rx0BfPin

Reads the current value of Rx0BF pin.

Rx1BfPin

Reads the current value of Rx1BF pin.

Tx0RtsPin

Writes a value to Tx0RTS pin.

Tx1RtsPin

Writes a value to Tx1RTS pin.

Tx2RtsPin

Writes a value to Tx2RTS pin.

Methods

AbortAllPendingTransmissions()

Abort send all messages from buffers, buffers will be empty

BitModify(Address, Byte, Byte)

Allows the user to set or clear individual bits in a particular register. Not all registers can be bit modified with this command.

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

EnableRollover()

If RXB0 contains a valid message and another valid message is received, an overflow error will not occur and the new message will be moved into RXB1

GetEmptyTxBuffer()

Get witch buffer empty now

GetInstructionsAddress(TransmitBuffer)

Get instructions address from buffer

IsMessageSend(TransmitBuffer)

Check is buffer empty

LoadTxBuffer(TxBufferAddressPointer, ReadOnlySpan<Byte>)

When loading a transmit buffer, reduces the overhead of a normal WRITE command by placing the Address Pointer at one of six locations for transmit buffer.

Read(Address)

Reads data from the register beginning at the selected address.

ReadMessages()

Read arrived messages

ReadRxBuffer(RxBufferAddressPointer, Int32)

When reading a receive buffer, reduces the overhead of a normal READ command by placing the Address Pointer at one of four locations for the receive buffer.

ReadStatus()

Quick polling command that reads several Status bits for transmit and receive functions.

RequestToSend(Boolean, Boolean, Boolean)

Instructs the controller to begin the message transmission sequence for any of the transmit buffers.

Reset()

Resets the internal registers to the default state and sets Configuration mode.

RxStatus()

Quick polling command that indicates a filter match and message type (standard, extended and/or remote) of the received message.

SendFromBuffer(TransmitBuffer)

Command to mcp25xx to send bytes from specific buffer

SendMessage(SendingCanMessage)

Send message

SendMessageFromBuffer(TransmitBuffer, SendingCanMessage)

Send message from specific buffer

SetBitrate(FrequencyAndSpeed)

The configuration registers (CNF1, CNF2, CNF3) control the bit timing for the CAN bus interface.

SetMode(OperationMode)

Set mode of operation

Write(Address, ReadOnlySpan<Byte>)

Writes data to the register beginning at the selected address.

WriteByte(Address, Byte)

Writes one byte to the register beginning at the selected address.

WriteByte(IRegister)

Writes a byte to the selected register address.

Applies to