CAN bus definition and the basic concept of CAN protocol

1. CAN bus definition

CAN (Controller Area Network) is an ISO international standardized serial communication protocol. Widely used in automobiles, ships, etc. With high performance and reliability that has been recognized by everyone.

The CAN controller determines the level of the bus by the potential difference of the two lines (CAN-H and CAN-L) that make up the bus. At any one time, there are two levels on the bus: dominant level and recessive level.

"Explicit" has the meaning of "priority". As long as one unit outputs a dominant level, the bus is dominant, and "hidden" has the meaning of "tolerance". Only all units output are hidden. The level of sex is only a recessive level on the bus. (The dominant level is stronger than the recessive level).

When a logical line "AND" is performed on the bus, the logic level of the dominant level is "0" and the recessive level is "1".

CAN总线定义与CAN协议的基本概念

The figure below shows a typical CAN topology connection diagram.

All units connected to the bus are capable of transmitting information. If more than one unit transmits information at the same time, the unit with the highest priority is eligible to transmit, and all other units perform the receiving operation.

CAN bus definition and the basic concept of CAN protocol

2. CAN bus features

The CAN bus protocol has the following features:

1) Multi-master control

When the bus is idle, all units connected to the bus can initiate the transmission of information, which is the concept of so-called multi-master control.

Devices that occupy the bus first are eligible to send information on the bus. This is the so-called CSMA/CR (Carrier Sense MulTIpleAccess/Collosion Avoidance) method.

If multiple devices start transmitting information at the same time, the device that sent the highest priority ID message is eligible to send.

2) Sending of information

In the CAN protocol, all transmitted information must meet a predefined format. When the bus is not occupied, any device connected to the bus can initiate the transmission of new information. If two or more devices initiate the transmission of information at the same time, the priority is determined by the ID. The ID does not indicate the destination of the message, but the priority of the message. If two or more devices initiate the transmission of information at the same time, the bus competes with each bit of the ID included in the information, and the winning device (that is, the information with the highest priority) can continue to be transmitted. The loser immediately stops sending and enters the receiving operation. Since there can only be one sender at a time on the bus, and the others are in the receiving state, there is no need to define the concept of an address in the underlying protocol.

3) System flexibility

Units connected to the bus do not have an identity like an address, so adding or removing a device does not require changes to software and hardware, or application layer software for other devices.

4) Communication speed

Any communication speed can be set to suit the network size.

For a network, all units must have the same communication speed. If they are different, they will generate errors and hinder network communication. However, different networks can have different communication speeds.

5) Remote data request

You can request other units to send data by sending a "Remote Frame".

6) Error detection, error notification, error recovery

All units can detect errors (error detection function).

The unit that detected the error immediately notifies all other units (error notification function) at the same time. If a unit detects an error while sending a message, it forces the message to be terminated and notifies all other devices that an error has occurred, and then it retransmits until the message is properly transmitted (error recovery).

7) Error isolation

There are two types of errors on the CAN bus: temporary errors (data on the bus is temporarily corrupted by noise); persistent errors (due to internal device errors (such as broken drives, problems with connections, etc.) And caused by). CAN can distinguish between these two types, on the one hand reducing the communication priority of the error unit to prevent the impact on other normal devices, and on the other hand, if it is a continuous error, the device is isolated from the bus.

8) Connection

The CAN bus allows multiple devices to be simultaneously connected to the bus with no logical limit. However, due to the limitation of delay and load capacity, the actual connectable devices are still limited, and the number of connected devices can be increased by reducing the communication speed. Conversely, if there are fewer connected devices, the speed of communication can be increased.

multi-core plug-in connector

press type multi-core plug-in connector,lighting internal connection,fast electric wiring connector,Plug-in Quick electric wiring connector

Guangdong Ojun Technology Co., Ltd. , https://www.ojunconnector.com