Topics / Communication Protocols / Q26
What is LIN, and how is it used alongside CAN?
Short answer: LIN (Local Interconnect Network) is a low-cost, single-wire, UART-based automotive bus (up to 20 kbps) with one commander (master) and up to 15 responders (slaves). The commander sends a header (break, sync byte 0x55, protected identifier) and the addressed node responds with 1–8 data bytes plus a checksum. It is used for simple, non-critical body electronics (window motors, seat controls, mirrors, rain sensors, switches) where CAN would be too expensive; a CAN ECU usually acts as the LIN commander and gateway.
Frame
| Break (≥13 dominant bits) | Sync 0x55 | PID (6-bit ID + 2 parity) | Data 1-8 bytes | Checksum |
^----------- header (commander) -----------^ ^-------- response (responder) ---------^
Key characteristics
| LIN | CAN | |
|---|---|---|
| Wires | 1 (+ 12 V and ground) | 2 (twisted pair) |
| Speed | ≤ 20 kbps | 125 kbps–1 Mbps (FD faster) |
| Access | commander polls via a schedule table | multi-controller arbitration |
| Determinism | fully scheduled by the commander | priority-based |
| Cost | very low (UART + simple transceiver, often an RC oscillator) | higher |
Details
- The sync byte 0x55 lets responders with inaccurate RC oscillators measure the bit rate and adjust (auto-baud), which is why cheap nodes work.
- The commander's schedule table defines which frames are sent when, giving deterministic timing.
- Checksum: classic (data only) or enhanced (data + PID, LIN 2.x).
- Diagnostics and node configuration are standardised (LIN 2.x, ISO 17987), and LIN supports sleep/wake-up over the bus.
- Many MCUs have LIN mode in their UARTs (break generation/detection).