EasyManua.ls Logo

Microchip Technology dsPIC30F - Page 667

Microchip Technology dsPIC30F
738 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
© 2004 Microchip Technology Inc. DS70070B-page 23-69
Section 23. CAN
CAN Module
23
If two or more bus nodes start their transmission at the same time (“Multiple Access”), collision
of the messages is avoided by bitwise arbitration (“Collision Detection/Non-Destructive
Arbitration” together with the “Wired-AND” mechanism, “dominant” bits override “recessive” bits).
Each node sends the bits of its message identifier (MSb first) and monitors the bus level. A node
that sends a recessive identifier bit but reads back a dominant one loses bus arbitration and
switches to Receive mode. This condition occurs when the message identifier of a competing
node has a lower binary value (dominant state = logic 0) and therefore, the competing node is
sending a message with a higher priority. In this way, the bus node with the highest priority
message wins arbitration without losing time by having to repeat the message. All other nodes
automatically try to repeat their transmission once the bus returns to the Idle state. It is not
permitted for different nodes to send messages with the same identifier, as arbitration could fail,
leading to collisions and errors later in the message.
The original CAN specifications (Versions 1.0, 1.2 and 2.0A) defined the message identifier as
having a length of 11 bits giving a possible 2048 message identifiers. The specification has since
been updated (to version 2.0B) to remove this limitation. CAN specification Version 2.0B allows
message identifier lengths of 11 and/or 29 bits to be used (an identifier length of 29 bits allows
over 536 million message identifiers). Version 2.0B CAN is also referred to as “Extended CAN”;
and Versions 1.0, 1.2 and 2.0A) are referred to as “Standard CAN”.
23.14.1 Standard CAN vs. Extended CAN
Those data frames and remote frames, which only contain the 11-bit identifier, are called
standard frames according to CAN specification V2.0A. With these frames, 2048 different
messages can be identified (identifiers 0-2047). However, the 16 messages with the lowest
priority (2032-2047) are reserved. Extended frames according to CAN specification V2.0B have
a 29-bit identifier. As already mentioned, this 29-bit identifier is made up of the 11-bit identifier
(“Standard lD”) and the 18-bit Extended identifier (“Extended ID”).
CAN modules specified by CAN V2.0A are only able to transmit and receive standard frames
according to the Standard CAN protocol. Messages using the 29-bit identifier cause errors. If a
device is specified by CAN V2.0B, there is one more distinction. Modules named “Part B Passive”
can only transmit and receive standard frames but tolerate extended frames without generating
error frames. “Part B Active” devices are able to transmit and receive both standard and
extended frames.
23.14.2 ISO Model
The lSO/OSl Reference Model is used to define the layers of protocol of a communication system
as shown in Figure 23-24. At the highest end, the applications need to communicate between
each other. At the lowest end, some physical medium is used to provide electrical signaling.
The higher levels of the protocol are run by software. Within the CAN bus specification, there is
no definition of the type of message, or the contents, or meaning of the messages transferred.
These definitions are made in systems such as Volcano, the Volvo automotive CAN specification
J1939, the U.S. heavy truck multiplex wiring specification; and Allen-Bradley DeviceNet and
Honeywell SDS, industrial protocols.
The CAN bus module definition encompasses two levels of the overall protocol:
The Data Link Layer
- The Logical Link Control (LLC) sub layer
- The Medium Access Control (MAC) sub layer
The Physical Layer
- The Physical Signaling (PLS) sub layer

Table of Contents

Other manuals for Microchip Technology dsPIC30F