
communicating with each other. The baud rate can be determined by testing
different values until valid messages are received. The listen-only mode cannot
transmit messages.
9.9.5 Loop-Back Mode
In the loop-back mode, messages can be directed from internal transmit buffers to
receive buffers without actually transmitting messages on the CAN bus. This mode
is useful during system developing and testing.
9.9.6 Error Recognition Mode
The error recognition mode is used to ignore all errors and receive all messages. In
this mode, all messages, valid or invalid are received and copied to the receive buffer.
9.9.7 CAN Message Transmission
The PIC18F258 microcontroller implements three dedicated transmit buffers: TXB0,
TXB1, and TXB2. Pending transmittable messages are in a priority queue. Before
the SOF is sent, the priorities of all buffers queued for transmission are compared.
The transmit buffer with the highest priority is sent first. If two buffers have the
same priority, the one with the higher buffer number is sent first. There are four
levels of priority.
9.9.8 CAN Message Reception
Reception of a message is a more complex process. The PIC18F258 microcontroller
includes two receive buffers, RXB0 and RXB1, with multiple acceptance filters
for each (see Figure 9.13). All received messages are assembled in the message
assembly buffer (MAB). Once a message is received, regardless of the type of
identifier and the number of data bytes, the entire message is copied into the MAB.
Received messages have priorities. RXB0 is the higher priority buffer, and it has two
message acceptance filters, RXF0 and RXF1. RXB1 is the lower priority buffer and
has four acceptance filters: RXF2, RXF3, RXF4, and RXF5. Two programmable
acceptance filter masks, RXM0 and RXM1, are also available, one for each receive
buffer.
www.newnespress.com
494 Chapter 9
Comentarios a estos manuales