Introduction to CAN
The CAN bus is a broadcast type of bus. This means that all nodes can “hear” all transmissions. There is no way to send a message to just a specific node; all nodes will invariably pick up all traffic. The CAN hardware, however, provides local filtering so that each node may react only on the interesting messages.
The bus uses Non-Return To Zero (NRZ) with bit-stuffing. The modules are connected to the bus in a wired-and fashion: if just one node is driving the bus to a logical 0, then the whole bus is in that state regardless of the number of nodes transmitting a logical 1.
The CAN standard defines four different message types. The messages uses a clever scheme of bit-wise arbitration to control access to the bus, and each message is tagged with a priority.
The CAN standard also defines an elaborate scheme for error handling and confinement which is described in more detail here.
Bit timing and clock synchronization is discussed here. Here’s a bit timing calculator you can use to calculate the CAN bus parameters and register settings.
CAN may be implemented using different physical layers, some of which are described here, and there are also a fair number of connector types in use. Here’s a number of oscilloscope pictures for those interested in the details of a message.