What is the CAN bus?
The Controller Area Network (CAN) bus is a half-duplex, multi-master, multi-slave, asynchronous serial data bus designed for connecting Electronic Control Units (ECU), also known as nodes, using two wires bus. From the electrical point of view, data is sent on these wires in a differential mode (as the USB bus does), so we can send the information across long distances with a large quantities of connected devices.
Each node is able to send and receive messages, but not simultaneously, and a message (or frame) consists primarily of the identifier (or ID, which represents the priority of the message) and up to 8 (or 64, in the case of extended messages) data bytes followed by some acknowledge and other control data.
To do its job, each node requires:
- AÂ CPU (microprocessor or host processor), which decides what received messages mean and which messages want to transmit.
- A CAN controller, which is often an integral part of the CPU (but it can be added as an external peripheral...