Understanding CAN Bus (Part 1)
Original source: http://www.cnblogs.com/jacklu/p/4729638.html
Blog Garden, Author: lulujianjie
Engineers in embedded systems generally know that the CAN bus is widely used in automobiles; in fact, naval electronic devices also extensively use CAN. As the country pays more attention to maritime defense, the demand for CAN will only increase. This summer, I had the opportunity to intern at a ship electrical company during a social practice in Suzhou, where I also learned about the CAN bus.
Overview
CAN (Controller Area Network) is a serial communication network that enables distributed real-time control.
When thinking of CAN, one must think of Bosch, the company that developed it (along with Intel).
CAN has many excellent features that allow it to be widely used. For example: a maximum transmission speed of 1 Mbps, a maximum communication distance of 10 km, a lossless arbitration mechanism, and a multi-master structure.
In recent years, the price of CAN controllers has decreased significantly, and many MCUs now integrate CAN controllers. Nowadays, every car is equipped with a CAN bus.
A typical application scenario for CAN:
CAN Bus Standards
The CAN bus standards only specify the physical layer and data link layer, requiring user-defined application layers. Different CAN standards differ only in the physical layer.
The CAN transceiver is responsible for converting between logical levels and physical signals.
It converts logical signals into physical signals (differential levels) or converts physical signals back into logical levels.
There are two CAN standards, namely ISO11898 and ISO11519, which have different differential voltage characteristics.
Low amplitude for high and low levels corresponds to fast transmission speeds;
*Twisted pair eliminates common-mode interference because the levels change simultaneously while the voltage difference remains constant.
Physical Layer
There are three types of interface devices for CAN.
Multiple nodes are connected, and as long as one is low, the bus is low; only when all nodes output high will it be high. This is known as