DEV Community

EBYTE
EBYTE

Posted on

What is CAN?

CAN is the abbreviation of Controller Area Network (hereinafter referred to as CAN), which is an ISO internationally standardized serial communication protocol. In the automotive industry, various electronic control systems have been developed due to requirements for vehicle safety, comfort, convenience, low power consumption, low cost, etc. Since the data types and reliability requirements used for communication between these electronic control systems are different, and they are often composed of multiple buses, the number of wire harnesses also increases with the composition.

In order to meet the needs of "appropriately reducing the number of wire harnesses" and "carrying out high-speed data communication between large amounts of data through multiple LANs", in 1986 the German electrical company Bosch developed a CAN communication protocol for the automotive industry. After the introduction of this protocol, CAN was standardized through ISO11898 and ISO11519, becoming the European standard protocol in the automotive industry network control system.

CAN bus data format

CAN-BUS communication frames are divided into data frames, remote frames, error frames, overload frames and frame intervals.

Data frame: Structurally composed of 7 segments, which are divided into standard frames (CAN2.0A) and extended frames (CAN2.0B) according to the length of the arbitration segment ID code. The standard frame is 11 bits, and the extended frame is 29 bits. This is also the format we come into contact with the most.

Remote frame: Compared with data frame, there is no data segment and the structure is composed of 7 segments. When you need a node on the bus to send you data, send a remote frame using the ID of the secondary node. The biggest advantage of remote frames is that it only takes one frame to complete a two-way interaction.

Error frame: Although the CAN bus is a highly reliable bus, errors can still occur: 5 types of errors will appear on the CAN bus.

Overload frame: When a node is not ready to receive the next frame of data, it will send an overload frame to notify the node.

Frame interval: only exists between data frames and remote frames, used for separation between frames.

Communication characteristics of CAN bus

CAN bus is a serial data communication protocol developed by German BOSCH in the early 1980s to solve the problem of data exchange between many control and test systems in modern automobiles. It can use twisted pairs, coaxial cables or light guides. Fiber is used as a multi-master bus as the communication medium. Communication rate up to 1Mbps.

(1) Free communication can be achieved between nodes: One of the biggest features of the CAN protocol is that it abolishes the traditional station address encoding and replaces it with encoding the communication data block. The advantage of using this method is that, in theory, the number of network nodes composed of CAN is not limited. The identifier of the data block can be composed of 11-bit or 29-bit binary numbers, so two or more different data blocks can be defined. This method of encoding by data block can also enable different nodes to receive the same data at the same time. This is very useful in distributed control systems.

(2) Simple structure: only 2 wires are connected to the outside, and error detection and management modules are integrated internally.

(3) Data error correction: Two-wire serial communication mode is adopted, which has strong error detection ability and can work in high noise interference environment. Each frame of data has CRC check and other error detection measures to ensure high reliability of data transmission performance, suitable for use in high interference environments.

(4) Complete the framing processing of communication data: the CAN bus communication interface integrates the physical layer and data link layer functions of the CAN protocol, which can complete the framing processing of communication data, including data bit filling, data block encoding, Cyclic redundancy check, priority discrimination, etc.

The characteristics of CAN's high performance and reliability have now been recognized and widely used in industries such as industrial automation, ships, medical equipment, and industrial equipment automation. CAN bus seems to be one of the hottest technological developments in the field of automation today, and is known as the computer local area network in the field of automation. Its emergence provides powerful technical support for distributed control systems to achieve real-time and reliable data communication between nodes.

Top comments (0)