Characteristics of CAN
The CAN protocol has the following characteristics.
(1) Multi-master control When the bus is idle, all units can start sending messages (multi-master control).
The unit that first accesses the bus can obtain the transmission right (CSMA / CA method * 1).
When multiple units start sending at the same time, the unit that sends the high-priority ID message can obtain the right to send.
(2) Sending messages In the CAN protocol, all messages are sent in a fixed format. When the bus is idle, all units connected to the bus can start sending new messages. When two or more units start sending messages at the same time, the priority is determined according to the identifier (IdenTIfier is referred to as ID below). The ID does not indicate the destination address of the transmission, but indicates the priority of the message accessing the bus. When two or more units start sending messages at the same time, each bit of each message ID is arbitrated and compared. The unit that wins arbitration (it is judged to have the highest priority) can continue to send messages, and the unit that loses arbitration immediately stops sending and performs the receiving work.
(3) The flexibility of the system The unit connected to the bus has no information similar to "address". Therefore, when adding units on the bus, the hardware, software and application layers of Other units connected to the bus do not need to be changed.
(4) The communication speed can be set according to the scale of the entire network.
In the same network, all units must be set to a uniform communication speed. Even if the communication speed of one unit is different from the others, this unit will output an error signal, which hinders the communication of the entire network. Different networks can have different communication speeds.
(5) Remote data request can request other units to send data by sending "remote control frame".
(6) Error detection function, error notification function, error recovery function All units can detect errors (error detection function).
The unit that detects the error will immediately notify all other units at the same time (error notification function).
Once the unit that is sending a message detects an error, it will force the current transmission to end. The unit that forcibly ends the transmission will retransmit this message repeatedly until it is successfully transmitted (error recovery function).
(7) Fault closure
CAN can determine whether the type of error is a temporary data error on the bus (such as external noise, etc.) or a continuous data error (such as internal unit failure, driver failure, disconnection, etc.). With this function, when a continuous data error occurs on the bus, the unit that caused the fault can be isolated from the bus.
(8) Connect
The CAN bus is a bus that can connect multiple units at the same time. The total number of connectable units is theoretically unlimited. However, the number of units that can be connected is actually limited by the time delay on the bus and the electrical load. Decreasing the communication speed increases the number of connectable units; increasing the communication speed decreases the number of connectable units.
ã€Note】 * 1 CSMA / CA: Carrier Sense MulTIple Access / Collision Avoidance
Guangzhou Etmy Technology Co., Ltd. , https://www.digitaltalkie.com