![DS18B20數(shù)字式溫度傳感器畢業(yè)論文中英文資料外文翻譯文獻_第1頁](http://file4.renrendoc.com/view/8aeba08083751544517020e5dc198d7d/8aeba08083751544517020e5dc198d7d1.gif)
![DS18B20數(shù)字式溫度傳感器畢業(yè)論文中英文資料外文翻譯文獻_第2頁](http://file4.renrendoc.com/view/8aeba08083751544517020e5dc198d7d/8aeba08083751544517020e5dc198d7d2.gif)
![DS18B20數(shù)字式溫度傳感器畢業(yè)論文中英文資料外文翻譯文獻_第3頁](http://file4.renrendoc.com/view/8aeba08083751544517020e5dc198d7d/8aeba08083751544517020e5dc198d7d3.gif)
![DS18B20數(shù)字式溫度傳感器畢業(yè)論文中英文資料外文翻譯文獻_第4頁](http://file4.renrendoc.com/view/8aeba08083751544517020e5dc198d7d/8aeba08083751544517020e5dc198d7d4.gif)
![DS18B20數(shù)字式溫度傳感器畢業(yè)論文中英文資料外文翻譯文獻_第5頁](http://file4.renrendoc.com/view/8aeba08083751544517020e5dc198d7d/8aeba08083751544517020e5dc198d7d5.gif)
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
外文翻譯(原文)PAGE26中英文資料外文翻譯文獻TheintroductiontoTheDS18B201.DESCRIPTIONTheDS18B20digitalthermometerprovides9-bitto12-bitCelsiustemperaturemeasurementsandhasanalarmfunctionwithnonvolatileuserprogrammableupperandlowertriggerpoints.TheDS18B20communicatesovera1-Wirebusthatbydefinitionrequiresonlyonedatalineforcommunicationwithacentralmicroprocessor.Ithasanoperatingtemperaturerangeof-55°Cto+125°Candisaccurateto±0.5°Covertherangeof-10°Cto+85°C.Inaddition,theDS18B20canderivepowerdirectlyfromthedataline(“parasitepower”),eliminatingtheneedforanexternalpowersupply.EachDS18B20hasaunique64-bitserialcode,whichallowsmultipleDS18B20stofunctiononthesame1-Wirebus.Thus,itissimpletouseonemicroprocessortocontrolmanyDS18B20sdistributedoveralargearea.ApplicationsthatcanbenefitfromthisfeatureincludeHVACenvironmentalcontrols,temperaturemonitoringsystemsinsidebuildings,equipment,ormachinery,andprocessmonitoringandcontrolsystems.2.FEATURESUnique1-Wire?InterfaceRequiresOnlyOnePortPinforCommunicationEachDevicehasaUnique64-BitSerialCodeStoredinanOn-BoardROMMulti-dropCapabilitySimplifiesDistributedTemperature-SensingApplicationsRequiresNoExternalComponentsCanBePoweredfromDataLine;PowerSupplyRangeis3.0Vto5.5VMeasuresTemperaturesfrom-55°Cto+125°C(-67°Fto+257°F)±0.5°CAccuracyfrom-10°Cto+85°CThermometerResolutionisUserSelectablefrom9to12BitsConvertsTemperatureto12-BitDigitalWordin750ms(Max)User-DefinableNonvolatile(NV)AlarmSettingsAlarmSearchCommandIdentifiesandAddressesDevicesWhoseTemperatureisOutsideProgrammedLimitsSoftwareCompatiblewiththeDS1822ApplicationsIncludeThermostaticControls,IndustrialSystems,ConsumerProducts,Thermometers,orAnyThermallySensitiveSystem3.OVERVIEWFigure1showsablockdiagramoftheDS18B20,andpindescriptionsaregiveninthePinDescriptiontable.The64-bitROMstoresthedevice’suniqueserialcode.Thescratchpadmemorycontainsthe2-bytetemperatureregisterthatstoresthedigitaloutputfromthetemperaturesensor.Inaddition,thescratchpadprovidesaccesstothe1-byteupperandloweralarmtriggerregisters(THandTL)andthe1-byteconfigurationregister.Theconfigurationregisterallowstheusertosettheresolutionofthetemperatureto-digitalconversionto9,10,11,or12bits.TheTH,TL,andconfigurationregistersarenonvolatile(EEPROM),sotheywillretaindatawhenthedeviceispowereddown.TheDS18B20usesMaxim’sexclusive1-Wirebusprotocolthatimplementsbuscommunicationusingonecontrolsignal.Thecontrollinerequiresaweakpullupresistorsincealldevicesarelinkedtothebusviaa3-stateoropen-drainport(theDQpininthecaseoftheDS18B20).Inthisbussystem,themicroprocessor(themasterdevice)identifiesandaddressesdevicesonthebususingeachdevice’sunique64-bitcode.Becauseeachdevicehasauniquecode,thenumberofdevicesthatcanbeaddressedononeDS18B20busisvirtuallyunlimited.The1-Wirebusprotocol,includingdetailedexplanationsofthecommandsand“timeslots,”iscoveredinthe1-WireBusSystemsection.AnotherfeatureoftheDS18B20istheabilitytooperatewithoutanexternalpowersupply.Powerisinsteadsuppliedthroughthe1-WirepullupresistorviatheDQpinwhenthebusishigh.Thehighbussignalalsochargesaninternalcapacitor(CPP),whichthensuppliespowertothedevicewhenthebusislow.Thismethodofderivingpowerfromthe1-Wirebusisreferredtoas“parasitepower.”Asanalternative,theDS18B20mayalsobepoweredbyanexternalsupplyonVDD.Figure1.DS18B20BlockDiagram4.OPERATION—MEASURINGTEMPERATURThecorefunctionalityoftheDS18B20isitsdirect-to-digitaltemperaturesensor.Theresolutionofthetemperaturesensorisuser-configurableto9,10,11,or12bits,correspondingtoincrementsof0.5°C,0.25°C,0.125°C,and0.0625°C,respectively.Thedefaultresolutionatpower-upis12-bit.TheDS18B20powersupinalow-poweridlestate.ToinitiateatemperaturemeasurementandA-to-Dconversion,themastermustissueaConvertT[44h]command.Followingtheconversion,theresultingthermaldataisstoredinthe2-bytetemperatureregisterinthescratchpadmemoryandtheDS18B20returnstoitsidlestate.IftheDS18B20ispoweredbyanexternalsupply,themastercanissue“readtimeslots”(seethe1-WireBusSystemsection)aftertheConvertTcommandandtheDS18B20willrespondbytransmitting0whilethetemperatureconversionisinprogressand1whentheconversionisdone.IftheDS18B20ispoweredwithparasitepower,thisnotificationtechniquecannotbeusedsincethebusmustbepulledhighbyastrongpullupduringtheentiretemperatureconversion.TheDS18B20outputtemperaturedataiscalibratedindegreesCelsius;forFahrenheitapplications,alookuptableorconversionroutinemustbeused.Thetemperaturedataisstoredasa16-bitsign-extendedtwo’scomplementnumberinthetemperatureregister(seeFigure2).Thesignbits(S)indicateifthetemperatureispositiveornegative:forpositivenumbersS=0andfornegativenumbersS=1.IftheDS18B20isconfiguredfor12-bitresolution,allbitsinthetemperatureregisterwillcontainvaliddata.For11-bitresolution,bit0isundefined.For10-bitresolution,bits1and0areundefined,andfor9-bitresolutionbits2,1,and0areundefined.Table1givesexamplesofdigitaloutputdataandthecorrespondingtemperaturereadingfor12-bitresolutionconversions.bit7bit6bit5bit4bit3bit2bit1bit0LSByte232221202-12-22-32-4bit15bit14bit13bit12bit11bit10bit9bit8MSByteSSSSS262524Figure2.TemperatureRegisterFormatTEMPERATUREDIGITALOUTPUT(BINARY)DIGITALOUTPUT(HEX)+125℃000001111101000007D0H+25.0625℃00000001100100010191H0℃00000000000000000000H-25.0625℃1111111001101111FE6FH-55℃1111110010010000FC90HTable1.Temperature/DataRelationship5.64-BITLASEREDROMCODEEachDS18B20containsaunique64–bitcode(seeFigure3)storedinROM.Theleastsignificant8bitsoftheROMcodecontaintheDS18B20’s1-Wirefamilycode:28h.Thenext48bitscontainauniqueserialnumber.Themostsignificant8bitscontainacyclicredundancycheck(CRC)bytethatiscalculatedfromthefirst56bitsoftheROMcode.The64-bitROMcodeandassociatedROMfunctioncontrollogicallowtheDS18B20tooperateasa1-Wiredeviceusingtheprotocoldetailedinthe1-WireBusSystemsection.8-BITCRC48-BITSERIALNUMBER8-BITFAMILYCODEMSBLSBMSBLSBMSBFigure3.64-BitLaseredROMCode6.MEMORYTheDS18B20’smemoryisorganizedasshowninFigure4.ThememoryconsistsofanSRAMscratchpadwithnonvolatileEEPROMstorageforthehighandlowalarmtriggerregisters(THandTL)andconfigurationregister.NotethatiftheDS18B20alarmfunctionisnotused,theTHandTLregisterscanserveasgeneral-purposememory.Byte0andbyte1ofthescratchpadcontaintheLSBandtheMSBofthetemperatureregister,respectively.Thesebytesareread-only.Bytes2and3provideaccesstoTHandTLregisters.Byte4containstheconfigurationregisterdata.Bytes5,6,and7arereservedforinternalusebythedeviceandcannotbeoverwritten.Byte8ofthescratchpadisread-onlyandcontainstheCRCcodeforbytes0through7ofthescratchpad.TheDS18B20generatesthisCRCusingthemethoddescribedintheCRCGenerationsection.Dataiswrittentobytes2,3,and4ofthescratchpadusingtheWriteScratchpad[4Eh]command;thedatamustbetransmittedtotheDS18B20startingwiththeleastsignificantbitofbyte2.Toverifydataintegrity,thescratchpadcanberead(usingtheReadScratchpad[BEh]command)afterthedataiswritten.Whenreadingthescratchpad,dataistransferredoverthe1-Wirebusstartingwiththeleastsignificantbitofbyte0.TotransfertheTH,TLandconfigurationdatafromthescratchpadtoEEPROM,themastermustissuetheCopyScratchpad[48h]command.Byte0TemperatureLSBByte1TemperatureMSBByte2THRegisterforhightemperatureByte3TLRegisterforlowtemperatureByte4ConfigurationRegisterByte5Reserved(FFH)Byte6Reserved(OCH)Byte7Reserved(IOH)Byte8CyclicRedundancyChecks(CRC)Figure4.DS18B20MemoryMap7.CONFIGURATIONREGISTERByte4ofthescratchpadmemorycontainstheconfigurationregister,whichisorganizedasillustratedinFigure5.TheusercansettheconversionresolutionoftheDS18B20usingtheR0andR1bitsinthisregisterasshowninTable2.Thepower-updefaultofthesebitsisR0=1andR1=1(12-bitresolution).Notethatthereisadirecttradeoffbetweenresolutionandconversiontime.Bit7andbits0to4intheconfigurationregisterarereservedforinternalusebythedeviceandcannotbeoverwritten.BIT7BIT6BIT5BIT4BIT3BIT2BIT1BIT0TMR1R011111Figure5.ConfigurationRegisterR0R1RESOLUTION(BITS)MAXCONVERSIONTIME0 0110101910111293.75ms187.5ms375ms750msTable2.ThermometerResolutionConfiguration8.1-WIREBUSSYSTEMThe1-Wirebussystemusesasinglebusmastertocontroloneormoreslavedevices.TheDS18B20isalwaysaslave.Whenthereisonlyoneslaveonthebus,thesystemisreferredtoasa“single-drop”system;thesystemis“multi-drop”iftherearemultipleslavesonthebus.Alldataandcommandsaretransmittedleastsignificantbitfirstoverthe1-Wirebus.Thefollowingdiscussionofthe1-Wirebussystemisbrokendownintothreetopics:hardwareconfiguration,transactionsequence,and1-Wiresignaling(signaltypesandtiming).9.TRANSACTIONSEQUENCEThetransactionsequenceforaccessingtheDS18B20isasfollows:Step1.InitializationStep2.ROMCommand(followedbyanyrequireddataexchange)Step3.DS18B20FunctionCommand(followedbyanyrequireddataexchange)ItisveryimportanttofollowthissequenceeverytimetheDS18B20isaccessed,astheDS18B20willnotrespondifanystepsinthesequencearemissingoroutoforder.ExceptionstothisrulearetheSearchROM[F0h]andAlarmSearch[ECh]commands.AfterissuingeitheroftheseROMcommands,themastermustreturntoStep1inthesequence.(1)INITIALIZATIONAlltransactionsonthe1-Wirebusbeginwithaninitializationsequence.Theinitializationsequenceconsistsofaresetpulsetransmittedbythebusmasterfollowedbypresencepulse(s)transmittedbytheslave(s).Thepresencepulseletsthebusmasterknowthatslavedevices(suchastheDS18B20)areonthebusandarereadytooperate.(2)ROMCOMMANDSAfterthebusmasterhasdetectedapresencepulse,itcanissueaROMcommand.Thesecommandsoperateontheunique64-bitROMcodesofeachslavedeviceandallowthemastertosingleoutaspecificdeviceifmanyarepresentonthe1-Wirebus.Thesecommandsalsoallowthemastertodeterminehowmanyandwhattypesofdevicesarepresentonthebusorifanydevicehasexperiencedanalarmcondition.TherearefiveROMcommands,andeachcommandis8bitslong.ThemasterdevicemustissueanappropriateROMcommandbeforeissuingaDS18B20functioncommand.1.SEARCHROM[F0h]Whenasystemisinitiallypoweredup,themastermustidentifytheROMcodesofallslavedevicesonthebus,whichallowsthemastertodeterminethenumberofslavesandtheirdevicetypes.ThemasterlearnstheROMcodesthroughaprocessofeliminationthatrequiresthemastertoperformaSearchROMcycle(i.e.,SearchROMcommandfollowedbydataexchange)asmanytimesasnecessarytoidentifyalloftheslavedevices.Ifthereisonlyoneslaveonthebus,thesimplerReadROMcommandcanbeusedinplaceoftheSearchROMprocess.2.READROM[33h]Thiscommandcanonlybeusedwhenthereisoneslaveonthebus.Itallowsthebusmastertoreadtheslave’s64-bitROMcodewithoutusingtheSearchROMprocedure.Ifthiscommandisusedwhenthereismorethanoneslavepresentonthebus,adatacollisionwilloccurwhenalltheslavesattempttorespondatthesametime.3.MATCHROM[55h]ThematchROMcommandfollowedbya64-bitROMcodesequenceallowsthebusmastertoaddressaspecificslavedeviceonamulti-droporsingle-dropbus.Onlytheslavethatexactlymatchesthe64-bitROMcodesequencewillrespondtothefunctioncommandissuedbythemaster;allotherslavesonthebuswillwaitforaresetpulse.4.SKIPROM[CCh]ThemastercanusethiscommandtoaddressalldevicesonthebussimultaneouslywithoutsendingoutanyROMcodeinformation.Forexample,themastercanmakeallDS18B20sonthebusperformsimultaneoustemperatureconversionsbyissuingaSkipROMcommandfollowedbyaConvertT[44h]command.NotethattheReadScratchpad[BEh]commandcanfollowtheSkipROMcommandonlyifthereisasingleslavedeviceonthebus.Inthiscase,timeissavedbyallowingthemastertoreadfromtheslavewithoutsendingthedevice’s64-bitROMcode.ASkipROMcommandfollowedbyaReadScratchpadcommandwillcauseadatacollisiononthebusifthereismorethanoneslavesincemultipledeviceswillattempttotransmitdatasimultaneously.5.ALARMSEARCH[ECh]TheoperationofthiscommandisidenticaltotheoperationoftheSearchROMcommandexceptthatonlyslaveswithasetalarmflagwillrespond.ThiscommandallowsthemasterdevicetodetermineifanyDS18B20sexperiencedanalarmconditionduringthemostrecenttemperatureconversion.AftereveryAlarmSearchcycle(i.e.,AlarmSearchcommandfollowedbydataexchange),thebusmastermustreturntoStep1(Initialization)inthetransactionsequence.(3)DS18B20FUNCTIONCOMMANDSAfterthebusmasterhasusedaROMcommandtoaddresstheDS18B20withwhichitwishestocommunicate,themastercanissueoneoftheDS18B20functioncommands.ThesecommandsallowthemastertowritetoandreadfromtheDS18B20’sscratchpadmemory,initiatetemperatureconversionsanddeterminethepowersupplymode.1.CONVERTT[44h]Thiscommandinitiatesasingletemperatureconversion.Followingtheconversion,theresultingthermaldataisstoredinthe2-bytetemperatureregisterinthescratchpadmemoryandtheDS18B20returnstoitslow-poweridlestate.Ifthedeviceisbeingusedinparasitepowermode,within10μs(max)afterthiscommandisissuedthemastermustenableastrongpulluponthe1-Wirebus.IftheDS18B20ispoweredbyanexternalsupply,themastercanissuereadtimeslotsaftertheConvertTcommandandtheDS18B20willrespondbytransmittinga0whilethetemperatureconversionisinprogressanda1whentheconversionisdone.Inparasitepowermodethisnotificationtechniquecannotbeusedsincethebusispulledhighbythestrongpullupduringtheconversion.2.READSCRATCHPAD[BEh]Thiscommandallowsthemastertoreadthecontentsofthescratchpad.Thedatatransferstartswiththeleastsignificantbitofbyte0andcontinuesthroughthescratchpaduntilthe9thbyte(byte8–CRC)isread.Themastermayissuearesettoterminatereadingatanytimeifonlypartofthescratchpaddataisneeded.3.WRITESCRATCHPAD[4Eh]Thiscommandallowsthemastertowrite3bytesofdatatotheDS18B20’sscratchpad.ThefirstdatabyteiswrittenintotheTHregister(byte2ofthescratchpad),thesecondbyteiswrittenintotheTLregister(byte3),andthethirdbyteiswrittenintotheconfigurationregister(byte4).Datamustbetransmittedleastsignificantbitfirst.AllthreebytesMUSTbewrittenbeforethemasterissuesareset,orthedatamaybecorrupted.4.COPYSCRATCHPAD[48h]ThiscommandcopiesthecontentsofthescratchpadTH,TLandconfigurationregisters(bytes2,3and4)toEEPROM.Ifthedeviceisbeingusedinparasitepowermode,within10μs(max)afterthiscommandisissuedthemastermustenableastrongpull-uponthe1-Wirebus.5.RECALLE2[B8h]Thiscommandrecallsthealarmtriggervalues(THandTL)andconfigurationdatafromEEPROMandplacesthedatainbytes2,3,and4,respectively,inthescratchpadmemory.ThemasterdevicecanissuereadtimeslotsfollowingtheRecallE2commandandtheDS18B20willindicatethestatusoftherecallbytransmitting0whiletherecallisinprogressand1whentherecallisdone.Therecalloperationhappensautomaticallyatpower-up,sovaliddataisavailableinthescratchpadassoonaspowerisappliedtothedevice.6.READPOWERSUPPLY[B4h]ThemasterdeviceissuesthiscommandfollowedbyareadtimeslottodetermineifanyDS18B20sonthebusareusingparasitepower.Duringthereadtimeslot,parasitepoweredDS18B20swillpullthebuslow,andexternallypoweredDS18B20swillletthebusremainhigh.10.WIRESIGNALINGTheDS18B20usesastrict1-Wirecommunicationprotocoltoensuredataintegrity.Severalsignaltypesaredefinedbythisprotocol:resetpulse,presencepulse,write0,write1,read0,andread1.Thebusmasterinitiatesallthesesignals,withtheexceptionofthepresencepulse.(1)INITIALIZATIONPROCEDURE—RESETANDPRESENCEPULSESAllcommunicationwiththeDS18B20beginswithaninitializationsequencethatconsistsofaresetpulsefromthemasterfollowedbyapresencepulsefromtheDS18B20.ThisisillustratedinFigure6.WhentheDS18B20sendsthepresencepulseinresponsetothereset,itisindicatingtothemasterthatitisonthebusandreadytooperate.Duringtheinitializationsequencethebusmastertransmits(TX)theresetpulsebypullingthe1-Wirebuslowforaminimumof480μs.Thebusmasterthenreleasesthebusandgoesintoreceivemode(RX).Whenthebusisreleased,the5k?pull-upresistorpullsthe1-Wirebushigh.WhentheDS18B20detectsthisrisingedge,itwaits15μsto60μsandthentransmitsapresencepulsebypullingthe1-Wirebuslowfor60μsto240μs.Figure6.InitializationTiming(2)READ/WRITETIMESLOTSThebusmasterwritesdatatotheDS18B20duringwritetimeslotsandreadsdatafromtheDS18B20duringreadtimeslots.Onebitofdataistransmittedoverthe1-Wirebuspertimeslot.1.WRITETIMESLOTSTherearetwotypesofwritetimeslots:“Write1”timeslotsand“Write0”timeslots.ThebusmasterusesaWrite1timeslottowritealogic1totheDS18B20andaWrite0timeslottowritealogic0totheDS18B20.Allwritetimeslotsmustbeaminimumof60μsindurationwithaminimumofa1μsrecoverytimebetweenindividualwriteslots.Bothtypesofwritetimeslotsareinitiatedbythemasterpullingthe1-Wirebuslow(seeFigure7).TogenerateaWrite1timeslot,afterpullingthe1-Wirebuslow,thebusmastermustreleasethe1-Wirebuswithin15μs.Whenthebusisreleased,the5k?pull-upresistorwillpullthebushigh.TogenerateaWrite0timeslot,afterpullingthe1-Wirebuslow,thebusmastermustcontinuetoholdthebuslowforthedurationofthetimeslot(atleast60μs).TheDS18B20samplesthe1-Wirebusduringawindowthatlastsfrom15μsto60μsafterthemasterinitiatesthewritetimeslot.Ifthebusishighduringthesamplingwindow,a1iswrittentotheDS18B20.Ifthelineislow,a0iswrittentotheDS18B20.Figure7.DS18B20WriteTimeSlot2.READTIMESLOTSTheDS18B20canonlytransmitdatatothemasterwhenthemasterissuesreadtimeslots.Therefore,themastermustgeneratereadtimeslotsimmediatelyafterissuingaReadScratchpad[BEh]orReadPowerSupply[B4h]command,sothattheDS18B20canprovidetherequesteddata.Inaddition,themastercangeneratereadtimeslotsafterissuingConvertT[44h]orRecallE2[B8h]commandstofindoutthestatusoftheoperation.Allreadtimeslotsmustbeaminimumof60μsindurationwithaminimumofa1μsrecoverytimebetweenslots.Areadtimeslotisinitiatedbythemasterdevicepullingthe1-Wirebuslowforaminimumof1μsandthenreleasingthebus(seeFigure8).Afterthemasterinitiatesthereadtimeslot,theDS18B20willbegintransmittinga1or0onbus.TheDS18B20transmitsa1byleavingthebushighandtransmitsa0bypullingthebuslow.Whentransmittinga0,theDS18B20willreleasethebusbytheendofthetimeslot,andthebuswillbepulledbacktoitshighidlestatebythepullupresister.OutputdatafromtheDS18B20isvalidfor15μsafterthefallingedgethatinitiatedthereadtimeslot.Therefore,themastermustreleasethebusandthensamplethebusstatewithin15μsfromthestartoftheslot.Figure8.DS18B20ReadTimeSlot外文翻譯(譯文)DS18B20介紹1.說明DS18B20數(shù)字式溫度傳感器提供9位到12位的攝氏溫度測量,并且有用戶可編程的、非易失性溫度上下限告警出發(fā)點。DS18B20通過單總線通信,單總線被定義為只需要一根數(shù)據(jù)線與主微處理器相連進行通信。它的工作溫度范圍為-55°C到+12°C,且在-10到85范圍內(nèi)的精度為±0.5°C。另外,DS18B20能夠從數(shù)據(jù)線中直接獲得能量(寄生電源),消除了對外部供電的需求。每一個DS18B20都有一個獨一無二的64位序列碼,這個序列碼允許多個DS18B20在同一根單總線上工作。因此很容易用一片微處理器控制分布在較大領(lǐng)域的多個DS18B20。包括高壓交流電環(huán)境控制、內(nèi)置溫度檢測系統(tǒng)建筑,或者機器、處理器和控制系統(tǒng)在內(nèi)的應(yīng)用程序都會從這個特點中受益。2.特點獨特的單線接口,只需要一個接口引腳即可通信每個設(shè)備均由一個存儲在板上ROM的獨一無二的64位序列碼多點能力使分布式溫度檢測應(yīng)用得以簡化不需要外部器件可用數(shù)據(jù)線供電;電壓范圍是3.0V~5.5V溫度測量范圍是-55°C到+12°C(-67°F到+257°F)-10°C到85°C范圍內(nèi)測量精度為±0.5°C傳感器分辨率可從9位到12位由用戶選擇最大在750ms內(nèi)轉(zhuǎn)換12位數(shù)據(jù)的字節(jié)用戶可定義的非易失性警報設(shè)置告警搜索命令和尋址超出設(shè)定的溫度界限的設(shè)備軟件與DS1822兼容應(yīng)用范圍包括溫度調(diào)節(jié)控制器、工業(yè)系統(tǒng)、消費產(chǎn)品、溫度計,或者任何熱敏感系統(tǒng)3.概述圖1給出了DS18B20的方框圖,并且在引腳說明表格中給出了引腳介紹。64位ROM存儲了設(shè)備的獨有的序列號。高速暫存器包含2個字節(jié)的溫度寄存器,溫度寄存器存儲來自溫度傳感器的數(shù)字輸出。另外高速暫存器提供功能訪問一個字節(jié)的溫度上限及下限告警觸發(fā)寄存器(TH和TL)和一個字節(jié)的配置寄存器。配置寄存器允許用戶設(shè)定9位、10位、11位和12位的溫度分辨率。TH,TL和配置寄存器是非易失性的(EEPROM),所以掉電后仍然能保存數(shù)據(jù)。DS18B20使用單總線獨有的協(xié)議準則,使用某一控制信號進行設(shè)備總線通信。控制線需要一個較小的上拉電阻,因為所有的設(shè)備通過一個三態(tài)漏極開路端口(如DS18B20的DQ引腳)連在總線上。在這個總線系統(tǒng)中,微處理器(控制設(shè)備)利用每一個設(shè)備的唯一64位碼識別和尋址總線上的設(shè)備。因為每個設(shè)備有唯一的序列碼,因此能夠被同一個DS18B20尋址的設(shè)備數(shù)量幾乎無限的。單總線協(xié)議,包括詳細的命令解釋和時間時隙說明,被掩膜在在單總線系統(tǒng)中。DS18B20的另一個特點是不需要再外部供電下即可工作。當總線高電平時能量由單線上拉電阻經(jīng)過DQ引腳獲得。高電平同時充電一個內(nèi)部電容,當總線低電平時由此電容供應(yīng)能量。這種供電方法被稱為“寄生電源”。另外一種選擇是DS18B20由接在VDD的外部電源供電。圖1.DS18B20方框圖4.運用-測量溫度DS18B20的核心功能是它的數(shù)字式溫度器。溫度傳感器的分辨率是用戶可配置的9位、10位、11位或12位,分別對應(yīng)的增量為0.5°C,0.25°C,0.125°C,和0.0625°C。系統(tǒng)上電默認值是12位及分辨率。DS18B20上電后處于空閑狀態(tài)。為了初始化溫度測量和進行AD轉(zhuǎn)換,控制器必須發(fā)出一個轉(zhuǎn)換溫度命令。轉(zhuǎn)換命令后,采集的溫度數(shù)據(jù)存儲在暫存器的2字節(jié)的溫度寄存器中,然后DS18B20恢復到空閑狀態(tài)。如果DS18B20是有外部供電,主機能在轉(zhuǎn)換命令后發(fā)出“讀時隙”命令,當溫度轉(zhuǎn)換在進行時DS18B20傳輸0、當轉(zhuǎn)換完成時DS18B20傳輸1來響應(yīng)主機。如果DS18B20采用寄生電源,這個響應(yīng)方法就不能使用,因為總線在整個溫度轉(zhuǎn)換環(huán)節(jié)中必須保持高電平。DS18B20輸出溫度數(shù)據(jù)是攝氏度標準,若要轉(zhuǎn)為華氏溫度,必須使用查表或轉(zhuǎn)換子程序。溫度數(shù)據(jù)以16位擴展補碼信號存儲在溫度寄存器中(見圖2)。符號位S表明溫度是正還是負:溫度正值時S=0.溫度負值時S=1。如果DS18B20被設(shè)定為12位分辨率,溫度寄存器中的所有位均為有效數(shù)據(jù);對11位分辨率,位0無定義。對10位分辨率,位1和位0無定義;對9位分辨率,位2、位1和位0無定義。表1給出了數(shù)字輸出數(shù)據(jù)和相應(yīng)的12位分辨率溫度讀取轉(zhuǎn)換。bit7bit6bit5bit4bit3bit2bit1bit0低字節(jié)232221202-12-22-32-4bit15bit14bit13bit12bit11bit10bit9bit8高字節(jié)SSSSS262524圖2.溫度寄存器格式溫度數(shù)字輸出(二進制)數(shù)字輸出(十六進制)+125℃000001111101000007D0H+25.0625℃00000001100100010191H0℃00000000000000000000H-25.0625℃1111111001101111FE6FH-55℃1111110010010000FC90H表1.溫度/數(shù)據(jù)關(guān)系5.64位激光ROM每一個DS18B20包含一個存儲在ROM中的獨一無二的64位碼(見圖3)。ROM碼的最低8位包含DS18B20的單總線產(chǎn)品系列碼:28h。接著48位包含一個唯一的序列號。最高8位包含一個循環(huán)冗余校驗(CRC)字節(jié),由ROM碼的前56位計算得來。64位ROM碼和相關(guān)的ROM邏輯控制功能允許DS18B20使用單總線系統(tǒng)中詳細協(xié)議來作為單總線設(shè)備運行。8位CRC編號48位序列號8位產(chǎn)品系列編碼圖3.64位激光ROM碼6.存儲器DS18B20的存儲器如同圖4中那樣被組織。存儲器由一個高速暫存RAM和一個非易失性電可擦除EEPROM組成,后者存儲高溫和低溫觸發(fā)器(TH和TL)和配置寄存器。如果DS18B20不使用告警功能,那么TH、TL和配置寄存器就作為通用寄存器使用。暫存器的字節(jié)0和字節(jié)1分別包含溫度寄存器的最低有效位和最高有效位。這些字節(jié)是只讀的。字節(jié)2和字節(jié)3提供提供TH和TL寄存器的接口。字節(jié)4包含配置寄存器數(shù)據(jù),字節(jié)5、6和7是為設(shè)備內(nèi)部使用而預留的,不可以被重寫。暫存器的字節(jié)8是只讀的,包含暫存器從字節(jié)0到字節(jié)7的值。DS18B20使用CRC產(chǎn)生一節(jié)中的方法形成這個CRC碼。數(shù)據(jù)被寫暫存器命令寫在暫存器的字節(jié)2、3和4中,數(shù)據(jù)從字節(jié)2的最低有效位開始寫入DS18B20。為了檢驗數(shù)據(jù)完整性,在數(shù)據(jù)被寫入之后可以讀取暫存器(使用讀暫存器命令)。當讀取暫存器時,數(shù)據(jù)通過單總線從字節(jié)0的最低有效位開始傳輸。為了把暫存器中的TH、TL和配置寄存器的數(shù)據(jù)傳輸?shù)紼EPROM中,主機必須發(fā)出復制暫存器命令。Byte0溫度測量值低8位LSBByte1溫度測量值高8位MSBByte2TH高溫寄存器Byte3TL低溫寄存器Byte4配置寄存器Byte5預留(FFH)Byte6預留(OCH)Byte7預留(IOH)Byte8循環(huán)冗余碼校驗(CRC)圖4.DS18B20存儲器映射7.配置寄存器高速暫存存儲器的字節(jié)4包含配置寄存器,正如圖5中那樣定義。用戶能通過表2中寄存器R0和R1位來設(shè)置DS18B20的轉(zhuǎn)換精度。這些位的上電默認值是R0=1和R1=1(12位分辨率)。在分辨率和轉(zhuǎn)換時間之間有個直接的折衷。配置寄存器中位7和位0至位4為設(shè)備內(nèi)部使用作預留,而且不能被重寫。位7位6位5位4位3位2位1位0TMR1R011111圖5.配置寄存器R0R1分辨率溫度最大轉(zhuǎn)換時間(ms)001101019位10位11位12位93.75187.5375750表2.溫度分辨率配置8.單總線系統(tǒng)一線總線系統(tǒng)使用單總線主控來控制一個或多個從機設(shè)備。DS18B20一直是個從機。當總線上只有一個從機時,系統(tǒng)被稱為“單站”體系,如果總線上有多個從機,系統(tǒng)就被稱為“多站”體系。所有數(shù)據(jù)和命令通過單總線首先傳輸最低有效位。接下來的單總線系統(tǒng)討論分為三個題目:硬件接法,處理順序,和單線信號(信號類型與定時)。9.處理順序訪問DS18B20的處理順序如下:第一步,初始化第二步,ROM命令(隨后是必要數(shù)據(jù)交換命令)第三步,DS18B2
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年日照貨運資格證試題及答案
- 2025年阿勒泰駕駛資格證模擬考試
- 2025年甘肅貨運從業(yè)資格證年考試題及答案
- 2025年銅仁從業(yè)資格證模擬考試題貨運考題
- 監(jiān)理工程師考試合同(2篇)
- 電力實時監(jiān)測合同(2篇)
- 2024-2025學年高中生物第3章第1節(jié)細胞膜-系統(tǒng)的邊界練習含解析新人教版必修1
- 華師大版數(shù)學七年級下冊《多邊形的外角和》聽評課記錄3
- 學生暑假實習總結(jié)
- 幼兒園中班月工作總結(jié)月工作總結(jié)
- 2024電動牙刷行業(yè)洞察
- 無人機實操技術(shù)課件:模擬器飛行
- 2024-2030年一次性治療服裝市場發(fā)展現(xiàn)狀分析及行業(yè)投資戰(zhàn)略研究報告
- 2024年云南省中考數(shù)學模擬試卷(三)
- 信息系統(tǒng)安全等級保護(一級)基本要求
- 2024年襄陽漢江檢測有限公司招聘筆試參考題庫附帶答案詳解
- 2021利達JB-QG-LD988EL JB-QT-LD988EL 火災(zāi)報警控制器 消防聯(lián)動控制器調(diào)試手冊
- 九下名著閱讀《儒林外史》考點+人物分析+中考真題
- 醫(yī)院檢驗科安全風險評估報告表單
- 第23課《出師表》課件(共48張)
- 高一北師大版歷史必修一知識點總結(jié)9篇
評論
0/150
提交評論