CAN (Controller Area Network) is a multi-master, differential serial bus protocol originally developed by Bosch for automotive applications, designed to allow microcontrollers and devices to communicate without a host computer. It uses a two-wire differential pair (CAN_H and CAN_L), supports non-destructive bitwise arbitration that prevents destructive collisions rather than recovering from them after the fact, and offers built-in error detection and fault confinement.
In practice
CAN is widely used in automotive ECUs, industrial automation, medical devices, and robotics where multiple nodes need to communicate reliably over moderate distances in electrically noisy environments. Classic CAN (ISO 11898-1) runs at up to 1 Mbps under typical physical-layer conditions, with bus length inversely related to bit rate -- as a rule of thumb, 1 Mbps is typically limited to around 40 meters and 125 kbps can reach roughly 500 meters, though actual limits vary with cable quality, transceiver timing, and topology. CAN FD (Flexible Data-rate), standardized in ISO 11898-1:2015, extends the data payload from 8 bytes to up to 64 bytes and allows the data phase to run at higher bit rates (commonly 2 to 8 Mbps) while keeping the arbitration phase at classic speeds.
On the hardware side, most modern MCUs targeted at automotive or industrial markets include one or more integrated CAN or CAN FD controllers (for example, the STM32F4/F7/H7 series, NXP S32K, Renesas RH850, Microchip PIC32, and the ESP32-S3). The CAN controller handles frame assembly, bit stuffing, arbitration, and error counters, but an external transceiver IC (such as the TI SN65HVD230, NXP TJA1050, or Microchip MCP2551) is still required on most designs to drive the physical differential bus. A few integrated SoCs include the transceiver on-chip, but this remains uncommon in general-purpose MCUs.
A critical operational detail is bus termination: each end of the CAN bus must be terminated with a 120-ohm resistor between CAN_H and CAN_L. Missing or incorrect termination is one of the most common causes of intermittent CAN errors in new designs. Node addressing is message-based rather than device-based -- each frame carries an identifier (11-bit in base frame format, 29-bit in extended frame format) that encodes both priority and content type, and any node can subscribe to any message by filtering on that identifier.
Error handling is a first-class feature of the protocol. Each node maintains transmit and receive error counters; a node that accumulates enough errors transitions from error-active to error-passive to bus-off state, preventing a faulty node from permanently disrupting the bus. This fault confinement behavior makes CAN well-suited for safety-relevant applications, though CAN itself is not a safety protocol -- functional safety systems such as CANopen Safety or AUTOSAR typically layer additional mechanisms on top.
Discussed on EmbeddedRelated
Frequently asked
What is the difference between Classic CAN and CAN FD?
Classic CAN (ISO 11898-1, pre-2015) limits data payloads to 8 bytes and runs at a single bit rate up to 1 Mbps across the entire frame. CAN FD (ISO 11898-1:2015) extends payloads to up to 64 bytes and switches to a higher bit rate (commonly 2 to 8 Mbps) during the data phase, while still using a slower rate for the arbitration phase to maintain multi-master compatibility. CAN FD data frames are not understood by Classic CAN nodes, so mixed networks generally require careful design constraints; in practice, Classic CAN and CAN FD nodes cannot freely coexist on the same bus without additional measures.
Do I need an external transceiver chip, or is one built into the MCU?
Most MCUs include only a CAN controller peripheral, which handles the protocol logic, framing, and error counters. A separate transceiver IC is required to interface the controller's TX/RX logic-level signals to the differential CAN_H/CAN_L bus. Common choices include the TI SN65HVD230 (3.3 V), NXP TJA1050 (5 V), and Microchip MCP2551 (5 V). Some highly integrated automotive SoCs include the transceiver on-chip, but this is not typical for general-purpose MCUs.
How does CAN arbitration work, and what happens when two nodes transmit at the same time?
CAN uses non-destructive bitwise arbitration. The bus is dominant (logic 0) when any node drives it low, and recessive (logic 1) only when no node is driving it. When two nodes transmit simultaneously, each monitors the bus while sending. A node transmitting a recessive bit that sees a dominant bit on the bus knows it has lost arbitration and stops transmitting immediately, without corrupting the winning frame. The frame with the lowest identifier value (highest priority) wins. The losing node automatically retries after the bus becomes idle.
How many nodes can be on a single CAN bus?
The CAN specification does not define a hard node count limit, but practical limits come from the bus load (identifier namespace, message timing budgets) and the electrical loading of the physical layer. Transceiver datasheets specify a maximum bus capacitance that constrains node count, but actual limits depend heavily on cable characteristics, stub lengths, and overall network design -- figures of roughly 30 to 110 nodes are sometimes cited as heuristics but are not a standard specification. In practice, many CAN networks run fewer than 30 active nodes.
What higher-level protocols are commonly used on top of CAN?
CAN defines only the physical and data-link layers. Higher-level protocols built on CAN include CANopen (common in industrial automation and robotics), SAE J1939 (heavy vehicles and equipment, uses 29-bit identifiers), NMEA 2000 (marine electronics, based on J1939), DeviceNet (industrial I/O), and OBD-II (on-board diagnostics in passenger vehicles). AUTOSAR communication stacks used in automotive ECU development can support both Classic CAN and CAN FD, depending on the specific
stack configuration and module set.
Differentiators vs similar concepts
CAN is often compared to
RS-485 and LIN. RS-485 is a physical layer standard only -- it defines the electrical interface but not framing, arbitration, or error handling, leaving those entirely to higher-level protocols such as Modbus. CAN bundles a defined frame format, bitwise arbitration,
CRC, and fault confinement into the protocol itself. LIN (Local Interconnect Network) is a single-master, single-wire bus running at up to 20 kbps, commonly used for low-priority automotive sub-networks (seat controls, mirror adjusters) where CAN's cost and complexity are unnecessary. CAN FD should not be confused with CAN XL, a newer extension (CiA 610-3) that raises payloads to 2048 bytes and targets automotive
Ethernet co-existence use cases.