Controller Area Network. Invented by Bosch in 1986 for automotive wiring harness reduction. Now standard in automotive, aerospace, industrial, and medical devices. Understanding CAN at the bit level is essential for embedded systems work.
Physical layer: Two wires, CAN-H and CAN-L. Differential signalling — a bit is dominant (logical 0) when CAN-H > CAN-L by ~2V, recessive (logical 1) when the lines are equal. Dominant wins in any collision — this is the basis of arbitration.
Arbitration: Multi-master. Any node can transmit when the bus is idle. If two nodes start simultaneously, they transmit their arbitration ID bit by bit. A node that transmits a recessive bit but reads a dominant bit knows it lost arbitration — it backs off and retries. The lowest numerical ID always wins. Non-destructive: the winning frame completes without corruption.
Frame format (CAN 2.0A, standard 11-bit ID):
SOF | ID[10:0] | RTR | IDE | r0 | DLC[3:0] | Data[0-8 bytes] | CRC[15:0] | ACK | EOFDLC is data length code — 0 to 8 bytes in classic CAN. CRC is 15-bit, computed over ID + control + data.
Why it's reliable: Every receiver checks the CRC and ACKs the frame. The transmitter verifies its own bits against the bus (bit monitoring). Any error — stuff error, CRC error, form error, ACK error, bit error — triggers an error frame. Nodes track error counts and enter error-passive or bus-off states to prevent a faulty node from disrupting the bus permanently.
In SpaceCAN, CAN frames are the transport layer for ECSS PUS service packets. The ECSS layer sits above CAN just as TCP sits above IP — using CAN's reliable framing for single-frame packets and implementing fragmentation/reassembly for larger payloads.