ds18b20中英文资料.docx
- 文档编号:29414946
- 上传时间:2023-07-23
- 格式:DOCX
- 页数:17
- 大小:31.64KB
ds18b20中英文资料.docx
《ds18b20中英文资料.docx》由会员分享,可在线阅读,更多相关《ds18b20中英文资料.docx(17页珍藏版)》请在冰豆网上搜索。
ds18b20中英文资料
FEATURES
Unique1-Wireinterfacerequiresonlyoneportpinforcommunication
Eachdevicehasaunique64-bitserialcodestoredinanonboardROM
Multidropcapabilitysimplifiesdistributedtemperaturesensingapplications
Requiresnoexternalcomponents
Canbepoweredfromdataline.Powersupplyrangeis3.0Vto5.5V
Measurestemperaturesfrom–55°Cto+125°C(–67°Fto+257°F)0.5Caccuracyfrom–10°Cto+85°C
Thermometerresolutionisuser-selectablefrom9to12bits
Convertstemperatureto12-bitdigitalwordin750ms(max.)
User-definablenonvolatile(NV)alarmsettings
Alarmsearchcommandidentifiesandaddressesdeviceswhosetemperatureis
outsideofprogrammedlimits(temperaturealarmcondition)
Availablein8-pinSO(150mil),8-pinSOP,and3-pinTO-92packages
SoftwarecompatiblewiththeDS1822
Applicationsincludethermostaticcontrols,industrialsystems,consumerproducts,
thermometers,oranythermallysensitive
特征:
独特的单线接口,只需1个接口引脚即可通信
每个设备都有一个唯一的64位串行代码存储在光盘片上
多点能力使分布式温度检测应用得以简化
不需要外部部件
可以从数据线供电,
测量范围从-55°C至+125°C(-67°F至257°F),从-10℃至+85°C的精度为°C温度计分辨率是用户可选择的9至12位
转换12位数字的最长时间是750ms
用户可定义的非易失性的温度告警设置
告警搜索命令识别和寻址温度在编定的极限之外的器件(温度告警情况)
采用8引脚SO(150mil),8引脚SOP和3引脚TO-92封装
软件与DS1822兼容
应用范围包括恒温控制工业系统消费类产品温度计或任何热敏系统
DESCRIPTION
TheDS18B20DigitalThermometerprovides9to12–bitcentigradetemperaturemeasurementsandhasanalarmfunctionwithnonvolatileuser-programmableupperandlowertriggerpoints.TheDS18B20communicatesovera1-Wirebusthatbydefinitionrequiresonlyonedataline(andground)forcommunicationwithacentralmicroprocessor.Ithasanoperatingtemperaturerangeof–55°Cto+125°Candisaccurateto0.5Covertherangeof–10°Cto+85°C.Inaddition,theDS18B20canderivepowerdirectlyfromthedataline(“parasitepower”),eliminatingtheneedforanexternalpowersupply.
EachDS18B20hasaunique64-bitserialcode,whichallowsmultipleDS18B20stofunctiononthesame1–wirebus;thus,itissimpletouseonemicroprocessortocontrolmanyDS18B20sdistributedoveralargearea.ApplicationsthatcanbenefitfromthisfeatureincludeHVACenvironmentalcontrols,temperaturemonitoringsystemsinsidebuildings,equipmentormachinery,andprocessmonitoringandcontrolsystems.
简介
该DS18B20的数字温度计提供9至12位的摄氏温度测量,并具有与非易失性用户可编程上限和下限报警功能。
信息单线接口送入DS1820或从DS1820送出,因此按照定义只需要一条数据线(和地线)与中央微处理器进行通信。
它的测温范围从-55°C到+125°C,其中从-10°C至+85°C可以精确到°C。
此外,DS18B20可以从数据线直接供电(“寄生电源”),从而消除了供应需要一个外部电源。
每个DS18B20的有一个唯一的64位序列码,它允许多个DS18B20s的功能在同一1-巴士线,因此,用一个微处理器控制大面积分布的许多DS18B20s是非常简单的。
此特性的应用范围包括HVAC、环境控制、建筑物、设备或机械内的温度检测以及过程监视和控制系统。
OVERVIEW
Figure1showsablockdiagramoftheDS18B20,andpindescriptionsaregiveninTable1.The64-bitROMstoresthedevice’suniqueserialcode.Thescratchpadmemorycontainsthe2-bytetemperatureregisterthatstoresthedigitaloutputfromthetemperaturesensor.Inaddition,thescratchpadprovidesaccesstothe1-byteupperandloweralarmtriggerregisters(THandTL),andthe1-byteconfigurationregister.Theconfigurationregisterallowstheusertosettheresolutionofthetemperature-to-digitalconversionto9,10,11,or12bits.TheTH,TLandconfigurationregistersarenonvolatile(EEPROM),sotheywillretaindatawhenthedeviceispowereddown.
TheDS18B20usesDallas’exclusive1-Wirebusprotocolthatimplementsbuscommunicationusingonecontrolsignal.Thecontrollinerequiresaweakpullupresistorsincealldevicesarelinkedtothebusviaa3-stateoropen-drainport(theDQpininthecaseoftheDS18B20).Inthisbussystem,themicroprocessor(themasterdevice)identifiesandaddressesdevicesonthebususingeachdevice’sunique64-bitcode.Becauseeachdevicehasauniquecode,thenumberofdevicesthatcanbeaddressedononebusisvirtuallyunlimited.The1-Wirebusprotocol,includingdetailedexplanationsofthecommandsand“timeslots,”iscoveredinthe1-WIREBUSSYSTEMsectionofthisdatasheet。
AnotherfeatureoftheDS18B20istheabilitytooperatewithoutanexternalpowersupply.Powerisinsteadsuppliedthroughthe1-WirepullupresistorviatheDQpinwhenthebusishigh.Thehighbussignalalsochargesaninternalcapacitor(CPP),whichthensuppliespowertothedevicewhenthebusislow.Thismethodofderivingpowerfromthe1-Wirebusisreferredtoas“parasitepower.”Asanalternative,theDS18B20mayalsobepoweredbyanexternalsupplyonVDD.
综述
图1显示了DS18B20的框图,引脚说明如表1。
64位ROM存储设备的独特序号。
存贮器包含2个字节的温度寄存器,它存储来自温度传感器的数字输出。
此外,暂存器可以访问的1个字节的上下限温度告警触发器(TH和TL)和1个字节的配置寄存器。
配置寄存器允许用户设置的温度到数字转换的分辨率为9,10,11或12位。
TH,TL和配置寄存器是非易失性的,因此掉电时依然可以保存数据。
该DS18B20使用Dallas的单总线协议,总线之间的通信用一个控制信号就可以实现。
控制线需要一个弱上拉电阻,因为所有的设备都是通过3线或开漏端口连接(在DS18B20中用DQ引脚)到总线的。
在这种总线系统中,微处理器(主设备)和地址标识上使用其独有的64位代码。
因为每个设备都有一个唯一的代码,一个总线上连接设备的数量几乎是无限的。
单总线协议,包括详细的解释命令和“时间槽”,此资料的单总线系统部分包括这些内容。
DS18B20的另一个特点是:
没有外部电源供电仍然可以工作。
当DQ引脚为高电平时,电压是单总线上拉电阻通过DQ引脚供应的。
高电平信号也可以充当外部电源,当总线是低电平时供应给设备电压。
这种从但总线提供动力的方法被称为“寄生电源“。
作为替代电源,该DS18B20也可以使用连接到VDD引脚的外部电源供电。
OPERATION—MEASURINGTEMPERATURE
ThecorefunctionalityoftheDS18B20isitsdirect-to-digitaltemperaturesensor.Theresolutionofthetemperaturesensorisuser-configurableto9,10,11,or12bits,correspondingtoincrementsof0.5C,0.25C,0.125C,and0.0625C,respectively.Thedefaultresolutionatpower-upis12-bit.TheDS18B20powers-upinalow-poweridlestate;toinitiateatemperaturemeasurementandA-to-Dconversion,themastermustissueaConvertT[44h]command.Followingtheconversion,theresultingthermaldataisstoredinthe2-bytetemperatureregisterinthescratchpadmemoryandtheDS18B20returnstoitsidlestate.IftheDS18B20ispoweredbyanexternalsupply,themastercanissue“readtimeslots”(seethe1-WIREBUSSYSTEMsection)aftertheConvertTcommandandtheDS18B20willrespondbytransmitting0whilethetemperatureconversionisinprogressand1whentheconversionisdone.IftheDS18B20ispoweredwithparasitepower,thisnotificationtechniquecannotbeusedsincethebusmustbepulledhighbyastrongpullupduringtheentiretemperatureconversion.ThebusrequirementsforparasitepowerareexplainedindetailinthePOWERINGTHEDS18B20sectionofthisdatasheet.
TheDS18B20outputtemperaturedataiscalibratedindegreescentigrade;forFahrenheitapplications,alookuptableorconversionroutinemustbeused.Thetemperaturedataisstoredasa16-bitsign-extendedtwo’scomplementnumberinthetemperatureregister(seeFigure2).Thesignbits(S)indicateifthetemperatureispositiveornegative:
forpositivenumbersS=0andfornegativenumbersS=1.IftheDS18B20isconfiguredfor12-bitresolution,allbitsinthetemperatureregisterwillcontainvaliddata.For11-bitresolution,bit0isundefined.For10-bitresolution,bits1and0areundefined,andfor9-bitresolutionbits2,1and0areundefined.Table2givesexamplesofdigitaloutputdataandthecorrespondingtemperaturereadingfor12-bitresolutionconversions.
运用——测量温度
该DS18B20的核心功能是它是直接输出数字信号的°C°C,0.125°C°C的增量。
其中传感器默认为12位。
该DS18B20在低功耗空闲状态;启动温度测量和模数转换,主机必须发出一个转换命令。
转换后,所产生的数据存储在内存中的2比特温度寄存器中,DS18B20返回其空闲状态。
如果DS18B20是由外部电源供电的,主机可以发出“读时隙”(见单总线系统部分),转换后,通过发送低电平T命令和DS18B20将响应,同时温度转换继续进行,当转换完成时变为高电平。
如果DS18B20的是寄生电源供电的,在整个温度转换过程中此通知技术不能使用,因为总线必须变为高电平。
总线需要寄生电源供电将在此资料的DS18B20驱动部分将详细介绍。
DS18B20的输出温度数据为标准摄氏度;对于华氏温度的应用,必须通过查表或运用转换方法。
温度数据在温度寄存器存储为一个16位符号扩展位和2位的补码(见表2)。
该标志位(S)表示温度的正负符号位:
为正数时S=0,为负数时S=1。
如果是DS18B20配置为12位分辨率,在温度寄存器的所有位将包含有效数据。
对于11位分辨率,位0是未定义的。
对于10位分辨率,位1和0是未定义的。
对于9位分辨率,位2,1和0是未定义的。
表2给出了输出数字数据和相应的12位分辨率温度读数转换例子。
OPERATION—ALARMSIGNALING
AftertheDS18B20performsatemperatureconversion,thetemperaturevalueiscomparedtotheuser-definedtwo’scomplementalarmtriggervaluesstoredinthe1-byteTHandTLregisters(seeFigure3).Thesignbit(S)indicatesifthevalueispositiveornegative:
forpositivenumbersS=0andfornegativenumbersS=1.TheTHandTLregistersarenonvolatile(EEPROM)sotheywillretaindatawhenthedeviceispowereddown.THandTLcanbeaccessedthroughbytes2and3ofthescratchpadasexplainedintheMEMORYsectionofthisdatasheet.
运用-报警信号
DS18B20温度转换完成后,温度值与用户定义的2个报警触发值存储在1个字节的TH和TL寄存器(见图3)。
符号位(S)表示温度值的正负:
S=0时为正值,S=1为负值。
TH和TL寄存器是非易失(EEPROM),因此他们将保留设备掉电时的数据。
TH和TL可通过暂存器中字节2和3获得,此内容在本数据表内存部分解释。
THANDTLREGISTERFORMATFigure3
Onlybits11through4ofthetemperatureregisterareusedintheTHandTLcomparisonsinceTHandTLare8-bitregisters.IfthemeasuredtemperatureislowerthanorequaltoTLorhigherthanTH,analarmconditionexistsandanalarmflagissetinsidetheDS18B20.Thisflagisupdatedaftereverytemperaturemeasurement;therefore,ifthealarmconditiongoesaway,theflagwillbeturnedoffafterthenexttemperatureconversion.ThemasterdevicecancheckthealarmflagstatusofallDS18B20sonthebusbyissuinganAlarmSearch[ECh]command.AnyDS18B20swithasetalarmflagwillrespondtothecommand,sothemastercandetermineexactlywhichDS18B20shaveexperiencedanalarmcondition.IfanalarmconditionexistsandtheTHorTLsettingshavechanged,anothertemperatureconversionshouldbedonetovalidatethealarmcondition.
TH和TL寄存器格式如图3
只有温度寄存器4中的11位用于和TL的比较中,由于TH和TL都是8位寄存器。
如果测量温度低于或等于TL或超过TH,报警情况存在而且报警标志将设置在DS18B20的内部。
每个温度测量后,这个标志位将被更新,因此,如果报警条件消失,下一个温度转换后,该标志位将被关闭。
主设备可以通过搜索ECH命令检查总线上所有DS18B20s报警标志位的状态。
任何有设置报警标志位的DS18B20s将响应命令,所以主设备可以决定到底是哪个DS18B20s在经历一个报警条件。
如果报警的情况存在,TH和TL设置已经改变了,另一个温度转换应该去验证报警条件。
POWERINGTHEDS18B20
TheDS18B20canbepoweredbyanexternalsupplyontheVDDpin,oritcanoperatein“parasitepower”mode,whichallowstheDS18B20tofunctionwithoutalocalexternalsupply.Parasitepowerisveryusefulforapplicationsthatrequireremotetemperaturesensingorthatareveryspaceco
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- ds18b20 中英文 资料
![提示](https://static.bdocx.com/images/bang_tan.gif)