下载
加入VIP
  • 专属下载特权
  • 现金文档折扣购买
  • VIP免费专区
  • 千万文档免费下载

上传资料

关闭

关闭

关闭

封号提示

内容

首页 DS18B20_温度传感器

DS18B20_温度传感器.pdf

DS18B20_温度传感器

lpxvlss_hls0s
2011-03-06 0人阅读 举报 0 0 暂无简介

简介:本文档为《DS18B20_温度传感器pdf》,可适用于工程科技领域

ofREV:FEATURESƒUniqueWire®InterfaceRequiresOnlyOnePortPinforCommunicationƒEachDevicehasaUniqueBitSerialCodeStoredinanOnBoardROMƒMultidropCapabilitySimplifiesDistributedTemperatureSensingApplicationsƒRequiresNoExternalComponentsƒCanBePoweredfromDataLinePowerSupplyRangeisVtoVƒMeasuresTemperaturesfrom°Cto°C(°Fto°F)ƒ±°CAccuracyfrom°Cto°CƒThermometerResolutionisUserSelectablefromtoBitsƒConvertsTemperaturetoBitDigitalWordinms(Max)ƒUserDefinableNonvolatile(NV)AlarmSettingsƒAlarmSearchCommandIdentifiesandAddressesDevicesWhoseTemperatureisOutsideProgrammedLimits(TemperatureAlarmCondition)ƒAvailableinPinSO(mils),PinμSOP,andPinTOPackagesƒSoftwareCompatiblewiththeDSƒApplicationsIncludeThermostaticControls,IndustrialSystems,ConsumerProducts,Thermometers,orAnyThermallySensitiveSystemPINCONFIGURATIONSDESCRIPTIONTheDSBdigitalthermometerprovidesbittobitCelsiustemperaturemeasurementsandhasanalarmfunctionwithnonvolatileuserprogrammableupperandlowertriggerpointsTheDSBcommunicatesoveraWirebusthatbydefinitionrequiresonlyonedataline(andground)forcommunicationwithacentralmicroprocessorIthasanoperatingtemperaturerangeof°Cto°Candisaccurateto±°Covertherangeof°Cto°CInaddition,theDSBcanderivepowerdirectlyfromthedataline(“parasitepower”),eliminatingtheneedforanexternalpowersupplyEachDSBhasauniquebitserialcode,whichallowsmultipleDSBstofunctiononthesameWirebusThus,itissimpletouseonemicroprocessortocontrolmanyDSBsdistributedoveralargeareaApplicationsthatcanbenefitfromthisfeatureincludeHVACenvironmentalcontrols,temperaturemonitoringsystemsinsidebuildings,equipment,ormachinery,andprocessmonitoringandcontrolsystemsDSBProgrammableResolutionWireDigitalThermometerwwwmaximiccomWireisaregisteredtrademarkofMaximIntegratedProducts,IncTO(DSB)(BOTTOMVIEW)DALLASBGNDDQVDDSO(mils)(DSBZ)NCNCNCNCGNDDQVDDNCDALLASBNCVDDNCNCNCGNDNCDQBμSOP(DSBU)DSBofORDERINGINFORMATIONPARTTEMPRANGEPINPACKAGETOPMARKDSB°Cto°CTOBDSB°Cto°CTOBDSBTR°Cto°CTO(Piece)BDSBTR°Cto°CTO(Piece)BDSBSLTR°Cto°CTO(Piece)*BDSBSLTR°Cto°CTO(Piece)*BDSBU°Cto°CμSOPBDSBU°Cto°CμSOPBDSBUTR°Cto°CμSOP(Piece)BDSBUTR°Cto°CμSOP(Piece)BDSBZ°Cto°CSODSBDSBZ°Cto°CSODSBDSBZTR°Cto°CSO(Piece)DSBDSBZTR°Cto°CSO(Piece)DSBDenotesaleadfreepackageA“”willappearonthetopmarkofleadfreepackagesTR=Tapeandreel*TOpackagesintapeandreelcanbeorderedwithstraightorformedleadsChoose“SL”forstraightleadsBulkTOordersarestraightleadsonlyPINDESCRIPTIONPINSOμSOPTONAMEFUNCTION,,,,,,,,NCNoConnectionVDDOptionalVDDVDDmustbegroundedforoperationinparasitepowermodeDQDataInputOutputOpendrainWireinterfacepinAlsoprovidespowertothedevicewhenusedinparasitepowermode(seethePoweringtheDSBsection)GNDGroundOVERVIEWFigureshowsablockdiagramoftheDSB,andpindescriptionsaregiveninthePinDescriptiontableThebitROMstoresthedevice’suniqueserialcodeThescratchpadmemorycontainsthebytetemperatureregisterthatstoresthedigitaloutputfromthetemperaturesensorInaddition,thescratchpadprovidesaccesstothebyteupperandloweralarmtriggerregisters(THandTL)andthebyteconfigurationregisterTheconfigurationregisterallowstheusertosettheresolutionofthetemperaturetodigitalconversionto,,,orbitsTheTH,TL,andconfigurationregistersarenonvolatile(EEPROM),sotheywillretaindatawhenthedeviceispowereddownTheDSBusesMaxim’sexclusiveWirebusprotocolthatimplementsbuscommunicationusingonecontrolsignalThecontrollinerequiresaweakpullupresistorsincealldevicesarelinkedtothebusviaastateoropendrainport(theDQpininthecaseoftheDSB)Inthisbussystem,themicroprocessor(themasterdevice)identifiesandaddressesdevicesonthebususingeachdevice’suniquebitcodeBecauseeachdevicehasauniquecode,thenumberofdevicesthatcanbeaddressedononeDSBofbusisvirtuallyunlimitedTheWirebusprotocol,includingdetailedexplanationsofthecommandsand“timeslots,”iscoveredintheWireBusSystemsectionAnotherfeatureoftheDSBistheabilitytooperatewithoutanexternalpowersupplyPowerisinsteadsuppliedthroughtheWirepullupresistorviatheDQpinwhenthebusishighThehighbussignalalsochargesaninternalcapacitor(CPP),whichthensuppliespowertothedevicewhenthebusislowThismethodofderivingpowerfromtheWirebusisreferredtoas“parasitepower”Asanalternative,theDSBmayalsobepoweredbyanexternalsupplyonVDDFigureDSBBlockDiagramOPERATIONMEASURINGTEMPERATUREThecorefunctionalityoftheDSBisitsdirecttodigitaltemperaturesensorTheresolutionofthetemperaturesensorisuserconfigurableto,,,orbits,correspondingtoincrementsof°C,°C,°C,and°C,respectivelyThedefaultresolutionatpowerupisbitTheDSBpowersupinalowpoweridlestateToinitiateatemperaturemeasurementandAtoDconversion,themastermustissueaConvertThcommandFollowingtheconversion,theresultingthermaldataisstoredinthebytetemperatureregisterinthescratchpadmemoryandtheDSBreturnstoitsidlestateIftheDSBispoweredbyanexternalsupply,themastercanissue“readtimeslots”(seetheWireBusSystemsection)aftertheConvertTcommandandtheDSBwillrespondbytransmittingwhilethetemperatureconversionisinprogressandwhentheconversionisdoneIftheDSBispoweredwithparasitepower,thisnotificationtechniquecannotbeusedsincethebusmustbepulledhighbyastrongpullupduringtheentiretemperatureconversionThebusrequirementsforparasitepowerareexplainedindetailinthePoweringtheDSBsectionTheDSBoutputtemperaturedataiscalibratedindegreesCelsiusforFahrenheitapplications,alookuptableorconversionroutinemustbeusedThetemperaturedataisstoredasabitsignextendedtwo’scomplementnumberinthetemperatureregister(seeFigure)Thesignbits(S)indicateifthetemperatureispositiveornegative:forpositivenumbersS=andfornegativenumbersS=IftheDSBisconfiguredforbitresolution,allbitsinthetemperatureregisterwillcontainvaliddataForbitresolution,bitisundefinedForbitresolution,bitsandareundefined,andforbitresolutionbits,,andareundefinedTablegivesexamplesofdigitaloutputdataandthecorrespondingtemperaturereadingforbitresolutionconversionsVPUkPOWERSUPPLYSENSEBITROMANDWirePORTDQVDDINTERNALVDDCPPPARASITEPOWERCIRCUITMEMORYCONTROLLOGICSCRATCHPADBITCRCGENERATORTEMPERATURESENSORALARMHIGHTRIGGER(TH)REGISTER(EEPROM)ALARMLOWTRIGGER(TL)REGISTER(EEPROM)CONFIGURATIONREGISTER(EEPROM)GNDDSBDSBofFigureTemperatureRegisterFormatBITBITBITBITBITBITBITBITLSBYTEBITBITBITBITBITBITBITBITMSBYTESSSSSS=SIGNTableTemperatureDataRelationshipTEMPERATURE(°C)DIGITALOUTPUT(BINARY)DIGITALOUTPUT(HEX)Dh*hhAhhhFFFhFFEhFEFhFCh*Thepoweronresetvalueofthetemperatureregisteris°COPERATIONALARMSIGNALINGAftertheDSBperformsatemperatureconversion,thetemperaturevalueiscomparedtotheuserdefinedtwo’scomplementalarmtriggervaluesstoredinthebyteTHandTLregisters(seeFigure)Thesignbit(S)indicatesifthevalueispositiveornegative:forpositivenumbersS=andfornegativenumbersS=TheTHandTLregistersarenonvolatile(EEPROM)sotheywillretaindatawhenthedeviceispowereddownTHandTLcanbeaccessedthroughbytesandofthescratchpadasexplainedintheMemorysectionFigureTHandTLRegisterFormatBITBITBITBITBITBITBITBITSOnlybitsthroughofthetemperatureregisterareusedintheTHandTLcomparisonsinceTHandTLarebitregistersIfthemeasuredtemperatureislowerthanorequaltoTLorhigherthanorequaltoTH,analarmconditionexistsandanalarmflagissetinsidetheDSBThisflagisupdatedaftereverytemperaturemeasurementtherefore,ifthealarmconditiongoesaway,theflagwillbeturnedoffafterthenexttemperatureconversionDSBofThemasterdevicecancheckthealarmflagstatusofallDSBsonthebusbyissuinganAlarmSearchEChcommandAnyDSBswithasetalarmflagwillrespondtothecommand,sothemastercandetermineexactlywhichDSBshaveexperiencedanalarmconditionIfanalarmconditionexistsandtheTHorTLsettingshavechanged,anothertemperatureconversionshouldbedonetovalidatethealarmconditionPOWERINGTHEDSBTheDSBcanbepoweredbyanexternalsupplyontheVDDpin,oritcanoperatein“parasitepower”mode,whichallowstheDSBtofunctionwithoutalocalexternalsupplyParasitepowerisveryusefulforapplicationsthatrequireremotetemperaturesensingorthatareveryspaceconstrainedFigureshowstheDSB’sparasitepowercontrolcircuitry,which“steals”powerfromtheWirebusviatheDQpinwhenthebusishighThestolenchargepowerstheDSBwhilethebusishigh,andsomeofthechargeisstoredontheparasitepowercapacitor(CPP)toprovidepowerwhenthebusislowWhentheDSBisusedinparasitepowermode,theVDDpinmustbeconnectedtogroundInparasitepowermode,theWirebusandCPPcanprovidesufficientcurrenttotheDSBformostoperationsaslongasthespecifiedtimingandvoltagerequirementsaremet(seetheDCElectricalCharacteristicsandACElectricalCharacteristics)However,whentheDSBisperformingtemperatureconversionsorcopyingdatafromthescratchpadmemorytoEEPROM,theoperatingcurrentcanbeashighasmAThiscurrentcancauseanunacceptablevoltagedropacrosstheweakWirepullupresistorandismorecurrentthancanbesuppliedbyCPPToassurethattheDSBhassufficientsupplycurrent,itisnecessarytoprovideastrongpullupontheWirebuswhenevertemperatureconversionsaretakingplaceordataisbeingcopiedfromthescratchpadtoEEPROMThiscanbeaccomplishedbyusingaMOSFETtopullthebusdirectlytotherailasshowninFigureTheWirebusmustbeswitchedtothestrongpullupwithinμs(max)afteraConvertThorCopyScratchpadhcommandisissued,andthebusmustbeheldhighbythepullupforthedurationoftheconversion(tCONV)ordatatransfer(tWR=ms)NootheractivitycantakeplaceontheWirebuswhilethepullupisenabledTheDSBcanalsobepoweredbytheconventionalmethodofconnectinganexternalpowersupplytotheVDDpin,asshowninFigureTheadvantageofthismethodisthattheMOSFETpullupisnotrequired,andtheWirebusisfreetocarryothertrafficduringthetemperatureconversiontimeTheuseofparasitepowerisnotrecommendedfortemperaturesabove°CsincetheDSBmaynotbeabletosustaincommunicationsduetothehigherleakagecurrentsthatcanexistatthesetemperaturesForapplicationsinwhichsuchtemperaturesarelikely,itisstronglyrecommendedthattheDSBbepoweredbyanexternalpowersupplyInsomesituationsthebusmastermaynotknowwhethertheDSBsonthebusareparasitepoweredorpoweredbyexternalsuppliesThemasterneedsthisinformationtodetermineifthestrongbuspullupshouldbeusedduringtemperatureconversionsTogetthisinformation,themastercanissueaSkipROMCChcommandfollowedbyaReadPowerSupplyBhcommandfollowedbya“readtimeslot”Duringthereadtimeslot,parasitepoweredDSBswillpullthebuslow,andexternallypoweredDSBswillletthebusremainhighIfthebusispulledlow,themasterknowsthatitmustsupplythestrongpullupontheWirebusduringtemperatureconversionsDSBofFigureSupplyingtheParasitePoweredDSBDuringTemperatureConversionsFigurePoweringtheDSBwithanExternalSupplyBITLASEREDROMCODEEachDSBcontainsaunique–bitcode(seeFigure)storedinROMTheleastsignificantbitsoftheROMcodecontaintheDSB’sWirefamilycode:hThenextbitscontainauniqueserialnumberThemostsignificantbitscontainacyclicredundancycheck(CRC)bytethatiscalculatedfromthefirstbitsoftheROMcodeAdetailedexplanationoftheCRCbitsisprovidedintheCRCGenerationsectionThebitROMcodeandassociatedROMfunctioncontrollogicallowtheDSBtooperateasaWiredeviceusingtheprotocoldetailedintheWireBusSystemsectionFigureBitLaseredROMCodeBITCRCBITSERIALNUMBERBITFAMILYCODE(h)MSBMSBLSBLSBLSBMSBVPUVPUkWireBUSμPDSBGNDVDDDQTOOTHERWIREDEVICESVDD(EXTERNALSUPPLY)DSBGNDVDDDQVPUkTOOTHERWIREDEVICESWireBUSμPDSBofMEMORYTheDSB’smemoryisorganizedasshowninFigureThememoryconsistsofanSRAMscratchpadwithnonvolatileEEPROMstorageforthehighandlowalarmtriggerregisters(THandTL)andconfigurationregisterNotethatiftheDSBalarmfunctionisnotused,theTHandTLregisterscanserveasgeneralpurposememoryAllmemorycommandsaredescribedindetailintheDSBFunctionCommandssectionByteandbyteofthescratchpadcontaintheLSBandtheMSBofthetemperatureregister,respectivelyThesebytesarereadonlyBytesandprovideaccesstoTHandTLregistersBytecontainstheconfigurationregisterdata,whichisexplainedindetailintheConfigurationRegistersectionBytes,,andarereservedforinternalusebythedeviceandcannotbeoverwrittenByteofthescratchpadisreadonlyandcontainstheCRCcodeforbytesthroughofthescratchpadTheDSBgeneratesthisCRCusingthemethoddescribedintheCRCGenerationsectionDataiswrittentobytes,,andofthescratchpadusingtheWriteScratchpadEhcommandthedatamustbetransmittedtotheDSBstartingwiththeleastsignificantbitofbyteToverifydataintegrity,thescratchpadcanberead(usingtheReadScratchpadBEhcommand)afterthedataiswrittenWhenreadingthescratchpad,dataistransferredovertheWirebusstartingwiththeleastsignificantbitofbyteTotransfertheTH,TLandconfigurationdatafromthescratchpadtoEEPROM,themastermustissuetheCopyScratchpadhcommandDataintheEEPROMregistersisretainedwhenthedeviceispowereddownatpoweruptheEEPROMdataisreloadedintothecorrespondingscratchpadlocationsDatacanalsobereloadedfromEEPROMtothescratchpadatanytimeusingtheRecallEBhcommandThemastercanissuereadtimeslotsfollowingtheRecallEcommandandtheDSBwillindicatethestatusoftherecallbytransmittingwhiletherecallisinprogressandwhentherecallisdoneFigureDSBMemoryMapSCRATCHPAD(POWERUPSTATE)ByteTemperatureLSB(h)ByteTemperatureMSB(h)EEPROMByteTHRegisterorUserByte*THRegisterorUserByteByteTLRegisterorUserByte*TLRegisterorUserByteByteConfigurationRegister*ConfigurationRegisterByteReserved(FFh)ByteReservedByteReserved(h)ByteCRC**Powerupstatedependsonvalue(s)storedinEEPROM(°C)DSBofCONFIGURATIONREGISTERByteofthescratchpadmemorycontainstheconfigurationregister,whichisorganizedasillustratedinFigureTheusercansettheconversionresolutionoftheDSBusingtheRandRbitsinthisregisterasshowninTableThepowerupdefaultofthesebitsisR=andR=(bitresolution)NotethatthereisadirecttradeoffbetweenresolutionandconversiontimeBitandbitstointheconfigurationregisterarereservedforinternalusebythedeviceandcannotbeoverwrittenFigureConfigurationRegisterBITBITBITBITBITBITBITBITRRTableThermometerResolutionConfigurationRRRESOLUTION(BITS)MAXCONVERSIONTIMEms(tCONV)ms(tCONV)ms(tCONV)ms(tCONV)CRCGENERATIONCRCbytesareprovidedaspartoftheDSB’sbitROMcodeandinthethbyteofthescratchpadmemoryTheROMcodeCRCiscalculatedfromthefirstbitsoftheROMcodeandiscontainedinthemostsignificantbyteoftheROMThescratchpadCRCiscalculatedfromthedatastoredinthescratchpad,andthereforeitchangeswhenthedatainthescratchpadchangesTheCRCsprovidethebusmasterwithamethodofdatavalidationwhendataisreadfromtheDSBToverifythatdatahasbeenreadcorrectly,thebusmastermustrecalculatetheCRCfromthereceiveddataandthencomparethisvaluetoeithertheROMcodeCRC(forROMreads)ortothescratchpadCRC(forscratchpadreads)IfthecalculatedCRCmatchesthereadCRC,thedatahasbeenreceivederrorfreeThecomparisonofCRCvaluesandthedecisiontocontinuewithanoperationaredeterminedentirelybythebusmasterThereisnocircuitryinsidetheDSBthatpreventsacommandsequencefromproceedingiftheDSBCRC(ROMorscratchpad)doesnotmatchthevaluegeneratedbythebusmasterTheequivalentpolynomialfunctionoftheCRC(ROMorscratchpad)is:CRC=XXXThebusmastercanrecalculatetheCRCandcompareittothe

用户评价(0)

关闭

新课改视野下建构高中语文教学实验成果报告(32KB)

抱歉,积分不足下载失败,请稍后再试!

提示

试读已结束,如需要继续阅读或者下载,敬请购买!

文档小程序码

使用微信“扫一扫”扫码寻找文档

1

打开微信

2

扫描小程序码

3

发布寻找信息

4

等待寻找结果

我知道了
评分:

/22

DS18B20_温度传感器

VIP

在线
客服

免费
邮箱

爱问共享资料服务号

扫描关注领取更多福利