Courtesy: ISO 17987 road vehicles local interconnect network (LIN)
LIN is a broadcast serial network comprising 16 nodes (one master and typically up to 15 slaves).
All messages are initiated by the master with at most one slave replying to a given message identifier. The master node can also act as a slave by replying to its own messages. Because all communications are initiated by the master it is not necessary to implement a collision detection.
The master and slaves are typically microcontrollers, but may be implemented in specialized hardware or ASICs in order to save cost, space, or power.
Current uses combine the low-cost efficiency of LIN and simple sensors to create small networks. These sub-systems can be connected by back-bone-network (i.e. CAN in cars).
The LIN bus is an inexpensive serial communications protocol, which effectively supports remote application within a car’s network. It is particularly intended for mechatronic nodes in distributed automotive applications, but is equally suited to industrial applications. It is intended to complement the existing CAN network leading to hierarchical networks within cars.
In the late 1990s the Local Interconnect Network (LIN) Consortium was founded by five European automakers, Mentor Graphics (Formerly Volcano Automotive Group) and Freescale (Formerly Motorola, now NXP). The first fully implemented version of the new LIN specification was published in November 2002 as LIN version 1.3. In September 2003 version 2.0 was introduced to expand configuration capabilities and make provisions for significant additional diagnostics features and tool interfaces.
The protocol’s main features are listed below:
- Single master, up to 16 slaves (i.e. no bus arbitration). This is the value recommended by the LIN Consortium to achieve deterministic time response.
- Slave Node Position Detection (SNPD) allows node address assignment after power-up
- Single wire communications up to 19.2 kbit/s @ 40 meter bus length. In the LIN specification 2.2, the speed up to 20 kbit/s.
- Guaranteed latency times.
- Variable length of data frame (2, 4 and 8 byte).
- Configuration flexibility.
- Multi-cast reception with time synchronization, without crystals or ceramic resonators.
- Data checksum and error detection.
- Detection of defective nodes.
- Low cost silicon implementation based on standard UART/SCI hardware.
- Enabler for hierarchical networks.
- Operating voltage of 12 V.
Data is transferred across the bus in fixed form messages of selectable lengths. The master task transmits a header that consists of a break signal followed by synchronization and identifier fields. The slaves respond with a data frame that consists of between 2, 4 and 8 data bytes plus 3 bytes of control information.
LIN message frame
A message contains the following fields:
- Synchronization break
- Synchronization byte
- Identifier byte
- Data bytes
- Checksum byte