CAN Bus

A Controller Area Network (CAN bus) is a robust vehicle bus standard designed to allow microcontrollers and devices to communicate with each other’s applications without a host computer. It is a message-based protocol, designed originally for multiplex electrical wiring within automobiles to save on copper, but it can also be used in many other contexts.

Resources

Frame Format

  • The stuff bits are interesting, they are there just to make sure that there is no short-circuit

Why CAN?

CAN is designed for real-time communication.

CAN Is both a protocol and a physical layer, whereas Ethernet is not.

Difference with Ethernet

  • CAN: When you refer to a “CAN bus,” you’re talking about both the physical wiring and the communication protocol that dictates how devices interact on that network.
  • Ethernet: When you refer to “Ethernet,” you’re primarily talking about the physical medium (and some aspects of data link layer communication), but not the higher-level protocols like TCP or IP that would run over that medium. Ethernet provides the foundation for other protocols to operate on top of it.

There are 2 different layers:

  1. Data Link Layer
  2. Physical Layer (PHY layer)
    1. At the physical layer, Differential Signaling is used to read voltage values

This follows the first two layers of the OSI Model, but layers 3 and above are not defined by CAN.

Physical Layer

CAN High and CAN Low.