The CAN (Controller Area Network) protocol is a serial-based digital communication protocol developed by BOSCH. It was initially developed for use in the automotive industry. It makes use of priority-based message arbitration. The voltage is not part of the standard, and operating voltages of 5V or 12V are commen.
A alternative communications protocol used in similar applications is the LIN protocol.
Bit Rate And Transmission Distances
The following equation can be used as a rule-of-thumb to calculate the maximum transmission speed for distances larger than 50m.
$BR\times L\leq 60$
$BR$ = bit rate (in Mbit/s)
$L$ = length (in m)
A table of common distances/transmission rates is shown below:
The CAN network uses priority-based message arbitration. The drivers to the CAN line(s) are open-drain. This means that if a node writes a 0 (dominant), it will over-write a 1 (recessive). This is also called a “wired AND” configuration.
Any sequential sequence of 5 bits of the same type requires the transmitter to insert a bit of the opposite polarity. Consequentially, the receiver has to remove this bit from the incoming data stream.
There are two different message lengths supported by the CAM protocol.
- CAM Base Frame (CAN2.0A)
- CAM Extended Frame (CAN2.0B)
There are 5 different types of errors:
- Bit Error: The transmitter monitors the bus level as it sends bits. If the level is not the same as what it is transmitting, a bit error occurs. Physical layer error.
- Stuff Error: If 6 or more consecutive bits of the same type are found. Physical layer error.
- Format Error: Data-link layer error.
- CRC Error: When the computed CRC does not match the one received in the message packet. Data-link layer error.
- Acknowledge (ACK) Error. Data-link layer error.
Widely followed basic CAN standard, defining parts of the physical and data link layers.
CANopen was developed for embedded devices in automation systems . It defines the OSI network layers that the basic CAN standards leaves unspecified, which includes the network layer and above.
A communication protocol for ships which is based on the CAN standard.
Uses a shielded twisted pair. Used in trucks, agricultural and industrial equipment.
Atmel T89C51CC01 Microcontroller. 8-bit 8051 architecture, with CAN interface. Supports bootloading from the CAN protocol
The Freescale MC9SO8D range of microcontrollers have built-in support for both CAN and LIN communication protocols. The CAN peripheral block is called an MSCAN.