TheLocalInterconnectNetwork(LIN),asdescribedin

theLINv1.2specification,isamulti-layeredsystem.The

levelsvaryfromthephysicalinterfaceuptothehigh

levelapplication.Thisapplicationnotefocusesonthe

implementationofalowleveldriver,essentiallyaninter-

facebetweenthephysicalhardwareconnectionandthe

higherlevelapplicationfirmware.Specifically,thisappli-

cationnotepresentsageneric‘bitbanged’LINslave

driverforboththePIC16andPIC18familyofPICmicro

®

microcontrollers.

Therearemanydetailstothisfirmwaredesign;how-

ever,thisapplicationnotefocusesmainlyonhowtoset

upandusethedriver.Therefore,theLINsystem

designershouldbeabletogetanapplicationrunning

onLINquicklywithoutspendingsignificanttimeonthe

detailsofLIN.

Someinformationaboutthefirmwaredesignispro-

videdattheendofthisdocumentforthecurious

designerwhowantstolearnalittlemoreaboutLINand

thisdriverimplementation.

Thereadershouldnoteinformationinthisapplication

noteispresentedwiththeassumptionthatthereader

isfamiliarwithLINspecificationv1.2,themostcurrent

specificationavailableatthetimethisdocumentwas

written.Therefore,notalldetailsaboutLINaredis-

cussed.RefertotheReferencessectionforadditional

information.AN239BitBangedLINSlaveNodeforPIC16&PIC18Author:RossFoslerProcessTimeMicrochipTechnologyInc.Availableprocesstimeisdictatedpredominatelybybitrate,clockfrequency,andcodeexecution.SincecodeINTRODUCTIONexecutionvariesdependingonthestatewithintheLINdriverandtherebeingmanystates,generatingasingleTheLocalInterconnectNetwork(LIN),asdescribedin

PIC16和PIC18 的位Banged LIN从节点

PIC16和PIC18 的位Banged LIN从节点