© 2004 Microchip Technology Inc. DS70074C-page 26-13
Section 26. Appendix
Appendix
26
For bus arbitration, CSMA/CD with NDA is used (Carrier Sense Multiple Access/Collision
Detection with Non-Destructive Arbitration). If bus node A wants to transmit a message across
the network, it first checks that the bus is in the Idle state (“Carrier Sense“) (i.e., no node is
currently transmitting). If this is the case (and no other node wishes to start a transmission at the
same moment), node A becomes the bus master and sends its message. All other nodes switch
to Receive mode during the first transmitted bit (Start-Of-Frame bit). After correct reception of
the message (which is acknowledged by each node), each bus node checks the message
identifier and stores the message, if required. Otherwise, the message is discarded.
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.
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 possible 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”.
B.2 Different CAN Implementations
B.2.1 Standard CAN, 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 (“Base lD”) and the 18-bit Extended identifier (“ID Extension”).
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.
B.3 Basic CAN, Full CAN
There is one more CAN characteristic concerning the interface between the CAN module and
the host CPU, dividing CAN chips into “Basic CAN” and “Full CAN” devices. This has nothing to
do with the used protocol though (Standard or Extended CAN), which makes it possible to use
both Basic and Full CAN devices in the same network.
In the Basic CAN devices, only basic functions of the protocol are implemented in hardware,
(e.g., the generation and the check of the bit steam). The decision, if a received message has to
be stored or not (acceptance filtering), and the whole message management, has to be done by
software (i.e., by the host CPU). Mostly the CAN chip only provides one transmit buffer and one
or two receive buffers. So the host CPU load is quite high using Basic CAN modules, therefore
these devices should only be used at low baud rates and low bus loads with only a few different
messages. The advantages of Basic CAN are the small chip size leading to low costs of these
devices.