您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 信息化管理 > SMI传感器AN05-001应用笔记
SILICONMICROSTRUCTURESINCORPORATEDAN05-001NotesforDigitalCommunicationwithSM5800SeriesPartsAPPLICATIONNOTE2005SMISiliconMicrostructures,Inc.♦1701McCarthyBlvd.♦Milpitas,CA95035♦USATel:408-577-0100♦Fax:408-577-0123♦Sales@si-micro.com♦(I2C)Businterfaceforalldigitalcommunication.UsingtheI2Cbusthecorrecteddigitalpressureanddigitaltemperaturevaluesareaccessedfromonboardmemoryregisters.DIGITALCOMMUNICATIONBASICSTheI2Cbusinterfaceutilizesatwo-wiremethodforcarryinginformationbackandforthbetweenintegratedcircuitdevicesconnectedtothebus.Thetwo-wiremethodiscomprisedofabi-directional,8-bitserialdata(SDA)lineprovidingthepathfordatatransfersandaserialclock(SCL)lineforsynchronizingthedatatransfers.AMasterdeviceintheformofapersonalcomputerormicrocontrollerinitiatesandterminatesdatatransfersontheSDAlineandgeneratestheclocksignalontheSCLline.ASlavedevice(whichrepresentstheSM5800seriesproduct)receivesrequestsfromtheMasterandtransmitsdataaccordingtotherequest.WhenmultipleSlavedevicesareconnectedtothebus,eachSlavemusthaveauniqueaddressandtheMastermustusethisuniqueaddresswhenperformingdatatransferswithaparticularSlave.AdiagramoftheI2CbuswithaMasterandmultipleSlaves(orSM5800parts)isshowninFigure1.MasterSlave1Slave2Slave3Figure1.MultipleSM5800seriesdevicesconnectedtotheI2CbusDATATRANSFERThedatatransferprocessbeginswiththeMasterissuingaSTART(S)command,whichalertsallSlavedevicesofthependingtransferrequest.TheMasterthenspecifieswhichSlavedevicetocommunicatewithandhowthedatawillflowbetweentheMasterandSlave.Next,theMasterwaitsfortheaddressedSlavetorespond.WhenthedesiredSlaveresponds,theMasterandSlavebegintheprocessoftransmittingdatabackandforth.ThetransferprocessendswiththeMasterissuingaSTOP(P)command.Figure2providesadiagramshowingasimpledatatransfersequence.START&STOPCONDITIONSInitiatedbytheMaster,aSTARTconditionedisidentifiedbyaHIGHtoLOWtransitionoftheSDAlinewhilemaintainingastableHIGHconditionontheSCLline.AlldatatransfermustbeginwithaSTARTconditionandthebuslinesareconsideredbusyafteraSTARTconditionisissued.ToendthetransferofdatatheMasterinitiatesaSTOPcondition,whichisidentifiedbyaLOWtoHIGHtransitionoftheSDAlinewhilemaintainingastableHIGHconditionontheSCLline.AN05-001NotesforDigitalCommunicationwithSM5800SeriesPartsAPPLICATIONNOTE2005SMISiliconMicrostructures,Inc.♦1701McCarthyBlvd.♦Milpitas,CA95035♦USATel:408-577-0100♦Fax:408-577-0123♦Sales@si-micro.com♦(LSB)8SLAVEADDRESS(BEGINSWTHMSB)ACKDATA(BEGINSWTHMSB)PACKSCLSDAHIGHLOWHIGHLOWSTARTCONDITIONSTOPCONDITIONBITSBYTECOMPLETE,CLOCKHELDLOWUNITLRECEIVINGDEVICEISREADYFORNEXTOPERATIONFigure2.DiagramofasimpledatatransfersequenceDATAFORMAT&VALIDITYTheSDAlineisan8-bitdigitallineandthisdefinesthesizeofeachbytetransferred.AnacknowledgebitstartswiththeTransmitterreleasingtheSDAlineHIGHatthestartoftheclockcycleimmediatelyfollowingabytetransfer.TheReceivermustthenpulltheSDAlineLOWduringtheHIGHperiodofthesameclockcycle.Theset-upandholdtimesfortheSDAandSCLlinesareprovidedinAPPENDIXA.EverybytetransferredfromTransmittertoReceiverstartswiththemostsignificantbit(MSB).ValiddatatransfersonlyoccurduringtheHIGHperiodoftheSCLclock.IfaReceiverneedstimetocarryoutarequestbeforereceivinganotherbyte,itcanholdtheSCLlineLOW.TodothistheReceiverperformsaninternalinterrupttoholdtheSCLLOW,whichforcestheTransmittertowaitbeforesendingthenextbyte.Whenready,theReceiverreleasestheSCLlineanddatatransfercontinues.ADDRESSINGASLAVEDEVICEAllSlavedevicesmusthaveauniqueidentificationoraddress.ASlaveaddresscannotexceedalengthofsevenbits.TheSlaveaddresssharesspaceintheaddressbytewitharead/writebitandthemaximumlengthoftheaddressbyteiseightbits.Toconstructtheaddressbyte,placetheSlaveaddressattheMSBoftheaddressbyteandplacetheread/writebitattheleastsignificantbit(LSB).TheaddressbytealwaysfollowsaSTARTcondition.WhenanaddressbyteissentovertheSDAline,eachSlavecomparestheMSBofthisbytewithitsownuniqueaddress.TheSlavewiththematchingaddressbecomesactiveandrespondsbysendinganacknowledgebitalongtheSDAlinetotheMaster.HowtheSlaverespondstothenextbytetransmittedbytheMasterfollowingtheacknowledgementdependsontheread/writebit.WhentheLSBoftheaddressbyteis“1”theSlavetransmitsdatafortheMastertoread.WhentheLSBoftheaddressbyteis”0”theSlavewaitsfortheMastertowritedatatotheSlave.SILICONMICROSTRUCTURESINCORPORATEDAN05-001NotesforDigitalCommunicationwithSM5800SeriesPartsAPPLICATIONNOTE2005SMISiliconMicrostructures,Inc.
本文标题:SMI传感器AN05-001应用笔记
链接地址:https://www.777doc.com/doc-4967223 .html