1. 首页
  2. 课程学习
  3. 嵌入式
  4. IIC总线主控的软件实现

IIC总线主控的软件实现

上传者: 2022-10-12 01:03:18上传 PDF文件 465.08 KB 热度 16次

Thisapplicationnotedescribesthesoftware

implementationofI

2

Cinterfaceroutinesforthe

PIC16CXXXfamilyofdevices.Onlythemastermodeof

I

2

Cinterfaceisimplementedinthisapplicationnote.

Thisimplementationisforasinglemastercommunica-

tiontomultipleslaveI

2

Cdevices.

SomePIC16CXXXdevices,suchasthePIC16C64and

PIC16C74,haveon-chiphardwarewhichimplements

theI

2

Cslaveinterface,whileotherPIC16CXXX

devices,suchasthePIC16C71andPIC16C84,donot

havethesameon-chiphardware.

ThisapplicationnotedoesnotdescribetheI

2

CBus

specificationsandtheuserisassumedtohavean

understandingoftheI

2

CBus.Fordetailedinformation

onthebus,theuserisadvisedtoreadtheI

2

CBus

SpecificationdocumentfromPhilips/Signetics(order

number98-8080-575).TheI

2

CBusisatwo-wireserial

buswithmultiplepossiblemastersandmultiplepossi-

bleslavesconnectedtoeachotherthroughtwowires.

Thetwowiresconsistsofaclockline(SCL)andadata

line(SDA)withbothlinesbeingbi-directional.Bi-direc-

tionalcommunicationisfacilitatedthroughtheuseof

wireandconnection(thelinesareeitheractive-lowor

passivehigh).TheI

2

CBusprotocolalsoallowscollision

detection,clocksynchronizationandhand-shakingfor

multi-mastersystems.Theclockisalwaysgeneratedby

themaster,buttheslavemayholditlowtogeneratea

waitstate.MSoftwareImplementationofI2CBusMasterAN554InmostsystemsthemicrocontrolleristhemasterandAuthor:AmarPalacherlatheexternalperipheraldevicesareslaves.IntheseMicrochipTechnologyInc.casesthisapplicationnotecanbeusedtoattachI2CslavestothePIC16CXXX(themaster)microcontroller.INTRODUCTIONThemulti-mastersystemisnotimplementedbecauseit

下载地址
用户评论