17.3 LIN Protocol
17.3.1 Master and Slave
A LIN cluster consists of one master task and several slave tasks. A master node contains the master task as well as a slave
task. All other nodes contain a slave task only.
Figure 17-1. LIN Cluster with One Master Node and “n” Slave Nodes
master node
master task
slave node
1
slave node
n
slave task
slave task
slave task
LIN bus
The master task decides when and which frame shall be transferred on the bus. The slave tasks provide the data
transported by each frame. Both the master task and the slave task are parts of the Frame handler
17.3.2 Frames
A frame consists of a header (provided by the master task) and a response (provided by a slave task).
The header consists of a BREAK and SYNC pattern followed by a PROTECTED IDENTIFIER. The identifier uniquely
defines the purpose of the frame. The slave task appointed for providing the response associated with the identifier transmits
it. The response consists of a DATA field and a CHECKSUM field.
Figure 17-2. Master and Slave Tasks Behavior in LIN Frame
HEADER
HEADER
Master Task
Slave Task 1
Slave Task 2
RESPONSE
RESPONSE
The slave tasks waiting for the data associated with the identifier receives the response and uses the data transported after
verifying the checksum.
Figure 17-3. Structure of a LIN Frame
FRAME SLOT
HEADER
SYNC
RESPONSE
DATA-n
PROTECTED
IDENTIFIER
BREAK
DATA-0
CHECKSUM
Field
Field
Field
Field
Field
Field
Break Delimiter
Response Space
Inter-byte Space
Inter-frame Space
Each byte field is transmitted as a serial byte, LSB first
ATmega16/32/64/M1/C1 [DATASHEET]
175
7647O–AVR–01/15