Sections
Controller Area Network (CAN) bus is a serial communication bus, originally developed for automotive purposes. It was developed by Robert Bosch Gmbh in 1983. As the name suggests, this two-wire, half duplex bus is used for the communication between different microcontroller units and other peripherals without the presence of host system. This multi-master bus uses short messages which are used in high speed applications.
Bosch has come up with the CAN standard version 2.0 specification. This specification is further divided in to two subdivisions, that is, Standard CAN and Extended CAN. The Standard CAN comes with 11-bit identifiers and signals at rate of 125kbps to 1mbps whereas the Extended CAN uses 29-bit identifiers.
The message frame of standard CAN consists of different fields.
The Extended CAN has 29-bit identifier which consists of 11-bit identifier followed by SRR, IDE bits and another 18-bit identifier. This extended CAN is very much used in automotive industry. The SRR bit is the Substitute Remote Request, which in case of, standard data frame and extended data frame, when both messages have equal base identifier, then standard data frame has higher priority and hence it indicates the bit is always a recessive bit.
CAN uses Carrier Sense Multiple Access\Collision Detection with Arbitration on Message Priority (CSMA/CD+AMP) for transmission of messages. Initially, the nodes check whether the bus is busy or not along with collision detection. But, on detection of collision the nodes does not stop from sending messages rather it does a special arbitration scheme. The messages send via CAN bus does not contain any addresses of the transmitting or receiving nodes. The message consists of unique identifier bits and as it moves through the bus, each node works out a test to check whether the message belongs to it, if so it processes it or else it just ignores the message.
The identifier bits determine the priority of the message. Lower the numerical value, the priority is higher. The message with higher priority accesses the bus readily and those with lower priority access the bus in the next cycles depending on the presence of high priority messages. The messages begin with identifier bits which can be either 11-bits or 29-bits depending upon the version. The contents in the message can be either low or high. Basically, the dominant bits are the logic low bits, so when message is transferred from one node to other, the node sending low bits will get access to the bus rather than the nodes sending high bits. In the network, two messages with same ID can’t be sent by the two nodes. In this case, arbitration gets cancelled.
The two kinds of frames in CAN bus is Data Frame and Remote Frame. In case of transmission of data, data frames are used. Remote frames are meant for requesting of information. A set RTR bit indicates that the node that is transmitting, is requesting for information. If any of the receiving nodes has the information should make it available to the transmitting node,
CAN bus find its application in engine control units and also in many embedded systems found in cars.
Sections