ELM633
The LIN Standard
The cost and the weight of wiring harnesses in
Each message that is sent is split into two parts,
the header and the response. The bus master always
generates the header, while the response can be
provided by either the master or by a slave processor
on the bus (depending on whether the master is trying
to send information or obtain it).
The first byte of the header is known as the ‘Synch
Byte’, and it is always the byte value 55. That value
was chosen because it creates a pattern of alternating
‘1’s and ‘0’s that can be used by the slave devices to
perform an internal timing calibration. This allows
inexpensive RC oscillators to be used for the slave
processors, reducing costs.
Following the Synch Byte, the master will always
send an Identifier Byte which describes the information
which is required, or that which is to follow. One can
think of it as the command byte.
The response field occurs after the ID byte, and
will generally consist of two, four, or eight data bytes,
followed by a single checksum byte. However, the
standard does allow certain commands to initiate
messages of arbitrary length so be aware of this when
developing software to process the LIN data.
automobiles have been a concern to manufacturers for
some time. To reduce both of these, manufacturers
have begun adopting network bus structures to allow
sharing of common information (and common copper).
While several topologies (CAN, etc.) were developed
for the high-speed information requirements, these
systems were a definite overkill for some applications,
particularly when interfacing with humans. Seeing this
need, the LIN Consortium was formed, and the Local
Interconnect Network standard was developed.
The LIN standard uses a bit serial protocol that is
in most respects identical to the one used for personal
computers. This keeps costs to a minimum as almost
‘off the shelf’ parts can be employed, and the learning
time for developers is quite short, as the techniques
are familiar. The one difference between standard
RS232 and the LIN protocol is that the LIN interface
uses a synchronizing signal.
The LIN synchronizing signal consists of a period
of at least 13 consecutive bit times that are all in the
active (‘0’) state. This would normally never occur in
an RS232 system as a start bit and 8 data bits could
only give a maximum of 9 active bits. The 13 bit long
start signal (known as the ‘Synch Break’ signal) is
always initiated by a bus master processor, to signal
that a data transfer is about to follow. Once the Synch
Break occurs, the message bytes are all sent in the
same manner as for standard RS232.
The following figure may prove helpful in
visualizing a typical LIN message:
Message
Header
Response
Data Bytes
55
ID
Synch Break
Checksum
Byte
Figure 1. The LIN Message Structure
ELM633DSB
Elm Electronics – Circuits for the Hobbyist
6 of 11
< http://www.elmelectronics.com/ >