中英文资料DS18B20FEATURES_Unique1-WireTMinterfacerequiresonlyoneportpinforcommunication_.Multidropcapabilitysimplifiesdistributedtemperaturesensingapplications_Requiresnoexternalcomponents_Canbepoweredfromdataline.Powersupplyrangeis3.0Vto5.5V_Zerostandbypowerrequired_Measurestemperaturesfrom-55°Cto+125°C.Fahrenheitequivalentis-67°Fto+257°F_0.5Caccuracyfrom-10°Cto+85°C_Thermometerresolutionisprogrammablefrom9to12bits_Converts12-bittemperaturetodigitalwordin750ms(max.)_User-definable,nonvolatiletemperaturealarmsettings_Alarmsearchcommandidentifiesandaddressesdeviceswhosetemperatureisoutsideofprogrammedlimits(temperaturealarmcondition)_Applicationsincludethermostaticcontrols,industrialsystems,consumerproducts,thermometers,oranythermallysensitivesystemPINDESCRIPTIONGND-GroundDQ-DataIn/OutVDD-PowerSupplyVoltageNC-NoConnectDESCRIPTIONTheDS18B20DigitalThermometerprovides9to12-bit(configurable)temperaturereadingswhichindicatethetemperatureofthedevice.Informationissentto/fromtheDS18B20overa1-Wireinterface,sothatonlyonewire(andground)needstobeconnectedfromacentralmicroprocessortoaDS18B20.Powerforreading,writing,andperformingtemperatureconversionscanbederivedfromthedatalineitselfwithnoneedforanexternalpowersource.BecauseeachDS18B20containsauniquesiliconserialnumber,multipleDS18B20scanexistonthesame1-Wirebus.Thisallowsforplacingtemperaturesensorsinmanydifferentplaces.ApplicationswherethisfeatureisusefulincludeHVACenvironmentalcontrols,sensingtemperaturesinsidebuildings,equipmentormachinery,andprocessmonitoringandcontrol.DETAILEDPINDESCRIPTIONTable1DS18B20Z(8-pinSOIC)andDS18P20P(TSOC):Allpinsnotspecifiedinthistablearenottobeconnected.OVERVIEWTheblockdiagramofFigure1showsthemajorcomponentsoftheDS18B20.TheDS18B20hasfourmaindatacomponents:1)64-bitlaseredROM,2)temperaturesensor,3)nonvolatiletemperaturealarmtriggersTHandTL,and4)aconfigurationregister.Thedevicederivesitspowerfromthe1-Wirecommunicationlinebystoringenergyonaninternalcapacitorduringperiodsoftimewhenthesignallineishighandcontinuestooperateoffthispowersourceduringthelowtimesofthe1-Wirelineuntilitreturnshightoreplenishtheparasite(capacitor)supply.Asanalternative,theDS18B20mayalsobepoweredfromanexternal3V-5.5Vsupply.CommunicationtotheDS18B20isviaa1-Wireport.Withthe1-Wireport,thememoryandcontrolfunctionswillnotbeavailablebeforetheROMfunctionprotocolhasbeenestablished.ThemastermustfirstprovideoneoffiveROMfunctioncommands:1)ReadROM,2)MatchROM,3)SearchROM,4)SkipROM,or5)AlarmSearch.Thesecommandsoperateonthe64-bitlaseredROMportionofeachdeviceandcansingleoutaspecificdeviceifmanyarepresentonthe1-Wirelineaswellasindicatetothebusmasterhowmanyandwhattypesofdevicesarepresent.AfteraROMfunctionsequencehasbeensuccessfullyexecuted,thememoryandcontrolfunctionsareaccessibleandthemastermaythenprovideanyoneofthesixmemoryandcontrolfunctioncommands.OnecontrolfunctioncommandinstructstheDS18B20toperformatemperaturemeasurement.TheresultofthismeasurementwillbeplacedintheDS18B20’sscratch-padmemory,andmaybereadbyissuingamemoryfunctioncommandwhichreadsthecontentsofthescratchpadmemory.ThetemperaturealarmtriggersTHandTLconsistof1byteEEPROMeach.IfthealarmsearchcommandisnotappliedtotheDS18B20,theseregistersmaybeusedasgeneralpurposeusermemory.Thescratchpadalsocontainsaconfigurationbytetosetthedesiredresolutionofthetemperaturetodigitalconversion.WritingTH,TL,andtheconfigurationbyteisdoneusingamemoryfunctioncommand.Readaccesstotheseregistersisthroughthescratchpad.Alldataisreadandwrittenleastsignificantbitfirst.DS18B203of26DS18B20BLOCKDIAGRAMFigure1PARASITEPOWERTheblockdiagram(Figure1)showstheparasite-poweredcircuitry.Thiscircuitry“steals”powerwhenevertheDQorVDDpinsarehigh.DQwillprovidesufficientpoweraslongasthespecifiedtimingandvoltagerequirementsaremet(seethesectiontitled“1-WireBusSystem”).Theadvantagesofparasitepoweraretwofold:1)byparasitingoffthispin,nolocalpowersourceisneededforremotesensingoftemperature,and2)theROMmaybereadinabsenceofnormalpower.InorderfortheDS18B20tobeabletoperformaccuratetemperatureconversions,sufficientpowermustbeprovidedovertheDQlinewhenatemperatureconversionistakingplace.SincetheoperatingcurrentoftheDS18B20isupto1.5mA,theDQlinewillnothavesufficientdriveduetothe5kpullupresistor.ThisproblemisparticularlyacuteifseveralDS18B20sareonthesameDQandattemptingtoconvertsimultaneously.TherearetwowaystoassurethattheDS18B20hassufficientsupplycurrentduringitsactiveconversioncycle.ThefirstistoprovideastrongpullupontheDQlinewhenevertemperatureconversionsorcopiestotheE2memoryaretakingplace.ThismaybeaccomplishedbyusingaMOSFETtopulltheDQlinedirectlytothepowersupplyasshowninFigure2.TheDQlinemustbeswitchedovertothestrongpullupwithin10smaximumafterissuinganyprotocolthatinvolvescopyingtotheE2memoryorinitiatestemperatureconversions.Thisallowsotherdatatrafficonthe1-Wirebusduringtheconversiontime.Inaddition,anynumberofDS18B20smaybeplacedonthe1-Wirebus,andiftheyalluseexternalpower,theymayallsimultaneouslyperformtemperatureconversionsbyissuingtheSkipROMcommandandthenissuingtheConvertTcommand.Notethataslon