The Controller Area Network (CAN) is a serial communication bus developed in the 1980s by Bosch for applications in the automotive industry (ABS, engine control). Currently, it is also used in industrial field buses (the most popular standards: CANopen, DeviceNet, SDS, ProfiBus).
The CAN bus uses a twisted pair and works with a maximum transmission speed of 1Mbit / s over a distance of up to 40m. As the distance increases, the maximum transmission speed drops (e.g. 250kbit / s at 250m).
There is no separate master unit in the CAN bus, therefore it belongs to the group of multi-master buses. The communication is of a broadcast nature because the messages broadcast on the bus are received by all devices. The most important features of CAN are: 1) up to 8 bytes of data in the message, 2) messages recognized by identifiers, 3) automatic bus access support, 4) hardware error handling.
Currently, in practice, there are two versions of the protocol: 2.0A (11-bit identifier) and 2.0B (29-bit identifier). Version 2.0B is an extended version of the 2.0A format. CAN data frame consists of 7 fields - start, arbitration, control, data, checksum, confirmation and end.
In the 2.0B standard, the arbitration field is 32 bits (12 in 2.0A). The message identifier, which takes up almost the entire arbitration field, determines the bus access priority - the smaller the numerical value, the higher the priority. Characteristic for the CAN bus is that the identifier is not assigned to the device, but to the message. Access to the bus is granted using the bit dominance method. It consists in the fact that all stations examine the bus condition waiting for the possibility of sending their own message. Conflicts resulting from possible simultaneous transmission by several stations are resolved in the initial phase of transmission during the sending of the arbitration field containing the message identifier. If the physical transmission medium has the property of zero dominance (as in the case of the so-called product on the wire), sending a logical value of 0 (dominant level) by one station, and a logical value of 1 (recessive level) by the other station causes that 0 is set on the bus. Therefore, the links will be received by the station with the lower identification number. Hence the condition of correct arbitration, requiring that two devices in the network cannot transmit messages with the same identifier.
CAN is characterized by high noise immunity and reliability. This was achieved by transmitting data in the form of a differential voltage signal and hardware protocol support and error checking. Specialized controllers form messages, control collision-free access to the bus, and filter messages. Currently, most of the leading electronic companies produce CAN controllers as peripheral systems or embedded in, for example, microcontrollers.