Ground Embedded KO Subscribe

Notes / Communication Protocols

LIN: the low-cost network where the master asks in turn

One wire, up to 20 kbps. A cheap way to connect vehicle devices that do not need to be fast, such as windows, mirrors and seats.

GROUND EMBEDDED · NOTECommunication Protocols 08LINUARTSPII2CCAN

Characteristics

Item Value
Wires Single wire + ground (battery voltage level)
Speed Up to 20 kbps
Topology 1 master, up to 16 slaves
Hardware A UART + LIN transceiver is enough

It can be implemented with the MCU's UART, without a CAN controller or a crystal, so the cost per node is low.

Operation: the schedule table

BreakSync0x55Protected IDData1 ~ 8 bytesChecksum
LIN frame. The header at the front is always sent by the master, and the response is added by the node that owns that ID.

The master sends headers (break + sync 0x55 + protected ID) in the order of a fixed schedule table. The node responsible for that ID (which may be the master itself) appends the response (data + checksum). The master decides who talks and when, so there are no collisions.

RoadmapSee where this note sits in Communication Protocols→

Sync field

LIN linestart10101010stop
The sync byte 0x55. 0 and 1 alternate, which makes it easy for a slave to measure the bit length.

A slave can use a cheap RC oscillator, because it measures the length of the 0x55 (01010101) pattern and adjusts its own clock to the master's baud rate.

Where it is used

Body electronics that can live with response times of tens of ms: windows, side mirrors, seats, wipers, interior lighting. A common structure is a domain controller that receives commands over CAN and passes them to sub-devices as the LIN master.

FREE PDFGet the 3 free ebooksIf you want to keep reading this topic as one book: BLDC motor control, serial communication and sensors at book length. PDFs are in Korean.Get them free →