
There are basically four message frames in CAN: data, remote, error, and overload. The
data and remote frames need to be set by the user. The other two are set by the CAN
hardware.
9.1 Data Frame
The data frame is in two formats: standard (having an 11-bit ID) and extended (having a
29-bit ID). The data frame is used by the transmitting device to send data to the
receiving device, and the data frame is the most important frame handled by the user.
Figure 9.7 shows the data frame’s structure. A standard data frame starts with the
start of frame (SOF) bit, which is followed by an 11-bit identifier and the remote
transmission request (RTR) bit. The identifier and the RTR form the 12-bit arbitration
field. The control field is 6 bits wide and indicates how many bytes of data are in
the data field. The data field can be 0 to 8 bytes. The data field is followed by the
Application
Presentation
Session
Transport
Netwok
Data Link
Physical
Medium Access Control
Medium Dependent Interface
Physical Medium Attachment
Physical Signaling
Logical Link Control
Figure 9.6: CAN and the OSI model
RTR
Control
11-bit
identifier
Start of
frame
Data
CRC
ACK
End of
frame
Figure 9.7: Standard data frame
www.newnespress.com
481Advanced PIC18 Projects—CAN Bus Projects
Commentaires sur ces manuels