DS18B20单片机中英文对照外文翻译文献.docx
- 文档编号:8091547
- 上传时间:2023-01-28
- 格式:DOCX
- 页数:19
- 大小:150.44KB
DS18B20单片机中英文对照外文翻译文献.docx
《DS18B20单片机中英文对照外文翻译文献.docx》由会员分享,可在线阅读,更多相关《DS18B20单片机中英文对照外文翻译文献.docx(19页珍藏版)》请在冰豆网上搜索。
DS18B20单片机中英文对照外文翻译文献
(文档含英文原文和中文翻译)
中英文对照外文翻译文献
TheintroductiontoTheDS18B20
1.DESCRIPTION
TheDS18B20digitalthermometerprovides9-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.FEATURES
●Unique1-Wire®InterfaceRequiresOnlyOnePortPinforCommunication
●EachDevicehasaUnique64-BitSerialCodeStoredinanOn-BoardROM
●Multi-dropCapabilitySimplifiesDistributedTemperature-SensingApplications
●RequiresNoExternalComponents
●CanBePoweredfromDataLine;PowerSupplyRangeis3.0Vto5.5V
●MeasuresTemperaturesfrom-55°Cto+125°C(-67°Fto+257°F)
●±0.5°CAccuracyfrom-10°Cto+85°C
●ThermometerResolutionisUserSelectablefrom9to12Bits
●ConvertsTemperatureto12-BitDigitalWordin750ms(Max)
●User-DefinableNonvolatile(NV)AlarmSettings
●AlarmSearchCommandIdentifiesandAddressesDevicesWhoseTemperatureisOutsideProgrammedLimits
●SoftwareCompatiblewiththeDS1822
●ApplicationsIncludeThermostaticControls,IndustrialSystems,ConsumerProducts,Thermometers,orAnyThermallySensitiveSystem
3.OVERVIEW
Figure1showsablockdiagramoftheDS18B20,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.DS18B20BlockDiagram
4.OPERATION—MEASURINGTEMPERATUR
ThecorefunctionalityoftheDS18B20isitsdirect-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.
bit7bit6bit5bit4bit3bit2bit1bit0
LSByte
23
22
21
20
2-1
2-2
2-3
2-4
bit15bit14bit13bit12bit11bit10bit9bit8
MSByte
S
S
S
S
S
26
25
24
Figure2.TemperatureRegisterFormat
TEMPERATURE
DIGITALOUTPUT
(BINARY)
DIGITALOUTPUT
(HEX)
+125℃
0000011111010000
07D0H
+25.0625℃
0000000110010001
0191H
0℃
0000000000000000
0000H
-25.0625℃
1111111001101111
FE6FH
-55℃
1111110010010000
FC90H
Table1.Temperature/DataRelationship
5.64-BITLASEREDROMCODE
EachDS18B20containsaunique64–bitcode(seeFigure3)storedinROM.Theleastsignificant8bitsoftheROMcodecontaintheDS18B20’s1-Wirefamilycode:
28h.Thenext48bitscontainauniqueserialnumber.Themostsignificant8bitscontainacyclicredundancycheck(CRC)bytethatiscalculatedfromthefirst56bitsoftheROMcode.The64-bitROMcodeandassociatedROMfunctioncontrollogicallowtheDS18B20tooperateasa1-Wiredeviceusingtheprotocoldetailedinthe1-WireBusSystemsection.
8-BITCRC
48-BITSERIALNUMBER
8-BITFAMILYCODE
MSBLSBMSBLSBMSB
Figure3.64-BitLaseredROMCode
6.MEMORY
TheDS18B20’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.
Byte0
TemperatureLSB
Byte1
TemperatureMSB
Byte2
THRegisterforhightemperature
Byte3
TLRegisterforlowtemperature
Byte4
ConfigurationRegister
Byte5
Reserved(FFH)
Byte6
Reserved(OCH)
Byte7
Reserved(IOH)
Byte8
CyclicRedundancyChecks(CRC)
Figure4.DS18B20MemoryMap
7.CONFIGURATIONREGISTER
Byte4ofthescratchpadmemorycontainstheconfigurationregister,whichisorganizedasillustratedinFigure5.TheusercansettheconversionresolutionoftheDS18B20usingtheR0andR1bitsinthisregisterasshowninTable2.Thepower-updefaultofthesebitsisR0=1andR1=1(12-bitresolution).Notethatthereisadirecttradeoffbetweenresolutionandconversiontime.Bit7andbits0to4intheconfigurationregisterarereservedforinternalusebythedeviceandcannotbeoverwritten.
BIT7BIT6BIT5BIT4BIT3BIT2BIT1BIT0
TM
R1
R0
1
1
1
1
1
Figure5.ConfigurationRegister
R0
R1
RESOLUTION(BITS)
MAXCONVERSIONTIME
0
0
1
1
0
1
0
1
9
10
11
12
93.75ms
187.5ms
375ms
750ms
Table2.ThermometerResolutionConfiguration
8.1-WIREBUSSYSTEM
The1-Wirebussystemusesasinglebusmastertocontroloneormoreslavedevices.TheDS18B20isalwaysaslave.Whenthereisonlyoneslaveonthebus,thesystemisreferredtoasa“single-drop”system;thesystemis“multi-drop”iftherearemultipleslavesonthebus.Alldataandcommandsaretransmittedleastsignificantbitfirstoverthe1-Wirebus.Thefo
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- DS18B20 单片机 中英文 对照 外文 翻译 文献