LIN is a network protocol used for communication between components in modern vehicles. It is a low-cost single-step serial protocol that supports communications up to 19.2 Kbit/s with a maximum bus length of 40 metres (131.23 ft).
History The need for a cheap serial network arose as the technologies and the facilities implemented in the car grew, while the CAN bus was too expensive to implement for every component in the car. European car manufacturers started using different serial communication technologies, which led to compatibility problems. In the late 1990s, the LIN Consortium was founded by five automakers (BMW, Volkswagen Group, Audi, Volvo Cars, Mercedes-Benz), with the technologies supplied (networking and hardware expertise) from Volcano Automotive Group and Motorola. The first fully implemented version of the new LIN specification (LIN version 1.3) was published in November 2002. In September 2003, version 2.0 was introduced to expand capabilities and make provisions for additional diagnostics features. LIN may be used also over the vehicle's battery power line with a special LIN-over-DC-power-line (DC-LIN) transceiver. LIN over DC power line (DC-LIN) was standardized as ISO/AWI 17987-8. CAN in Automation has been appointed by the ISO Technical Management Board (TMB) as the Registration Authority for the LIN Supplier ID standardized in the ISO 17987 series.
Network topology LIN is a broadcast serial network comprising 16 nodes (one master and 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 a back-bone network (i.e. CAN in cars).
Overview 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 bytes). Configuration flexibility. Multicast 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 2, 4 or 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
Frame types Unconditional frame. These always carry signals and their identifiers are in the range 0 to 59 (0x00 to 0x3b). All subscribers of the unconditional frame shall receive the frame and make it available to the application (assuming no errors were detected). Event-triggered frame. The purpose of this is to increase the responsiveness of the LIN cluster without assigning too much of the bus bandwidth to the polling of multiple slave nodes with seldom occurring events. The first data byte of the carried unconditional frame shall be equal to a protected identifier assigned to an event-triggered frame. A slave shall reply with an associated unconditional frame only if its data value has changed. If none of the slave tasks responds to the header the rest of the frame slot is silent and the header is ignored. If more than one slave task responds to the header in the same frame slot a collision will occur, and the master has to resolve the collision by requesting all associated unconditional frames before requesting the event-triggered frame again. Sporadic frame. This frame is transmitted by the master as required, so a collision cannot occur. The header of a sporadic frame shall only be sent in its associated frame slot when the master task knows that a signal carried in the frame has been updated. The publisher of the sporadic frame shall always provide the response to the header. Diagnostic frame. These always carry diagnostic or configuration data and they always contain eight data bytes. The identifier is either 60 (0x3C), called master request frame, or 61(0x3D), called slave response frame. Before generating the header of a diagnostic frame, the master task asks its diagnostic module if it shall be sent or if the bus shall be silent. The slave tasks publish and subscribe to the response according to their diagnostic module. User-defined frame. These can carry any kind of information. Their identifier is 62 (0x3E). The header of a user-defined frame is always transmitted when a frame slot allocated to the frame is processed Reserved frame. These shall not be used in a LIN 2.0 cluster. Their identifier is 63 (0x3F).
… excerpt ends here. Continue reading the full article.