AN2059_PIC_LIN.pdf - 文件：
LIN Basics and Implementation of the MCC LIN Stack Library
on 8-Bit PIC? Microcontrollers
Mary Tamar Tan
Microchip Technology Inc.
LIN (Local Interconnect Network) is a low-cost serial
communications protocol implemented mostly in
automotive networks. It is typically used for
mechatronic nodes in automobiles, but is also wellsuited for industrial applications. Users new to LIN
communication often struggle with the overhead of the
high layers of LIN protocol intricacies (e.g., LDF, NCF
files). When in fact, the goal is to simply and quickly
evaluate LIN MCUs and LIN PHYs hardware with very
basic LIN message transmission. To assist with rapid
prototyping, the complimentary MCC LIN Code
Generator was created. When your LIN application is
ready for production, customizable production-proven
LIN Stacks and support are available from Microchip’s
LIN design and third party partners.
The first part of this application note covers the basics
of LIN to provide a brief background on how it works.
However, it is highly recommended that the reader is
familiar with the LIN specification v2.2A (the most
current specification available at the time of this
The second part describes a sample demonstration of
the LIN protocol using the Microchip MPLAB? Code
Configurator (MCC) LIN Stack Library. The default
library supports PIC? MCUs that have a hardware
EUSART peripheral. The latest MCC LIN updates also
add support for bit-banged EUART, enhanced
checksum and slave automatic bit rate detection using
the bit-banged EUART.This document provides stepby-step procedures on how to generate both LIN
master and slave drivers quickly and easily.
? 2017 Microchip Technology Inc.
MCC LIN Stack Features
The MCC generates code for following basic LIN
? Constructs LIN message frame by combining
? Automates LIN PID generation with user-defined
? Generates LIN classic or enhanced checksum