DS18B20的研究与应用外文文献翻译、中英文翻译_第1页
DS18B20的研究与应用外文文献翻译、中英文翻译_第2页
DS18B20的研究与应用外文文献翻译、中英文翻译_第3页
DS18B20的研究与应用外文文献翻译、中英文翻译_第4页
DS18B20的研究与应用外文文献翻译、中英文翻译_第5页
已阅读5页,还剩2页未读, 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

附录ResearchandApplicationofDS18B20CommunicationtotheDS18B20isviaa1-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.InorderfortheDS18B20tobeabletoperformaccuratetemperatureconversions,sufficientpowermustbeprovidedovertheDQlinewhenatemperatureconversionistakingplace.SincetheoperatingcurrentoftheDS18B20isupto1.5mA,theDQlinewillnothavesufficientdriveduetothe5kpullupresistor.ThisproblemisparticularlyacuteifseveralDS18B20sareonthesameDQandattemptingtoconvertsimultaneously.TherearetwowaystoassurethattheDS18B20hassufficientsupplycurrentduringitsactiveconversioncycle.ThefirstistoprovideastrongpullupontheDQlinewhenevertemperatureconversionsorcopiestotheE2memoryaretakingplace.ThismaybeaccomplishedbyusingaMOSFETtopulltheDQlinedirectlytothepowersupplyasshowninFigure2.TheDQlinemustbeswitchedovertothestrongpullupwithin10smaximumafterissuinganyprotocolthatinvolvescopyingtotheE2memoryorinitiatestemperatureconversions.Whenusingtheparasitepowermode,theVDDpinmustbetiedtoground.AnothermethodofsupplyingcurrenttotheDS18B20isthroughtheuseofanexternalpowersupplytiedtotheVDDpin.TheadvantagetothisisthatthestrongpullupisnotrequiredontheDQline,andthebusmasterneednotbetiedupholdingthatlinehighduringtemperatureconversions.Thisallowsotherdatatrafficonthe1-Wirebusduringtheconversiontime.Inaddition,anynumberofDS18B20smaybeplacedonthe1-Wirebus,andiftheyalluseexternalpower,theymayallsimultaneouslyperformtemperatureconversionsbyissuingtheSkipROMcommandandthenissuingtheConvertTcommand.Notethataslongastheexternalpowersupplyisactive,theGNDpinmaynotbefloating.ThecorefunctionalityoftheDS18B20isitsdirect-to-digitaltemperaturesensor.TheresolutionoftheDS18B20isconfigurable(9,10,11,or12bits),with12-bitreadingsthefactorydefaultstate.Thisequatestoatemperatureresolutionof0.5C,0.25C,0.125C,or0.0625C.FollowingtheissuanceoftheConvertT[44h]command,atemperatureconversionisperformedandthethermaldataisstoredinthescratchpadmemoryina16-bit,sign-extendedtwo’scomplementformat.Thetemperatureinformationcanberetrievedoverthe1-WireinterfacebyissuingaReadScratchpad[BEh]commandoncetheconversionhasbeenperformed.Thedataistransferredoverthe1-Wirebus,LSBfirst.TheMSBofthetemperatureregistercontainsthe“sign”(S)bit,denotingwhetherthetemperatureispositiveornegative.EachDS18B20containsauniqueROMcodethatis64-bitslong.Thefirst8bitsarea1-Wirefamilycode(DS18B20codeis28h).Thenext48bitsareauniqueserialnumber.Thelast8bitsareaCRCofthefirst56bits.The64-bitROMandROMFunctionControlsectionallowtheDS18B20tooperateasa1-Wiredeviceandfollowthe1-Wireprotocoldetailedinthesection“1-WireBusSystem.”ThefunctionsrequiredtocontrolsectionsoftheDS18B20arenotaccessibleuntiltheROMfunctionprotocolhasbeensatisfied.ThisprotocolisdescribedintheROMfunctionprotocolflowchart.The1-WirebusmastermustfirstprovideoneoffiveROMfunctioncommands:1)ReadROM,2)MatchROM,3)SearchROM,4)SkipROM,or5)AlarmSearch.AfteraROMfunctionsequencehasbeensuccessfullyexecuted,thefunctionsspecifictotheDS18B20areaccessibleandthebusmastermaythenprovideoneofthesixmemoryandcontrolfunctioncommands.TheDS18B20hasan8-bitCRCstoredinthemostsignificantbyteofthe64-bitROM.ThebusmastercancomputeaCRCvaluefromthefirst56-bitsofthe64-bitROMandcompareittothevaluestoredwithintheDS18B20todetermineiftheROMdatahasbeenreceivederror-freebythebusmaster.TheequivalentpolynomialfunctionofthisCRCis:CRC=X8+X5+X4+1TheDS18B20alsogeneratesan8-bitCRCvalueusingthesamepolynomialfunctionshownaboveandprovidesthisvaluetothebusmastertovalidatethetransferofdatabytes.IneachcasewhereaCRCisusedfordatatransfervalidation,thebusmastermustcalculateaCRCvalueusingthepolynomialfunctiongivenaboveandcomparethecalculatedvaluetoeitherthe8-bitCRCvaluestoredinthe64-bitROMportionoftheDS18B20(forROMreads)orthe8-bitCRCvaluecomputedwithintheDS18B20(whichisreadasaninthbytewhenthescratchpadisread).ThecomparisonofCRCvaluesanddecisiontocontinuewithanoperationaredeterminedentirelybythebusmaster.ThereisnocircuitryinsidetheDS18B20thatpreventsacommandsequencefromproceedingiftheCRCstoredinorcalculatedbytheDS18B20doesnotmatchthevaluegeneratedbythebusmaster.Thescratchpadisorganizedaseightbytesofmemory.Thefirst2bytescontaintheLSBandtheMSBofthemeasuredtemperatureinformation,respectively.ThethirdandfourthbytesarevolatilecopiesofTHandTLandarerefreshedwitheverypower-onreset.Thefifthbyteisavolatilecopyoftheconfigurationregisterandisrefreshedwitheverypower-onreset.Theconfigurationregisterwillbeexplainedinmoredetaillaterinthissectionofthedatasheet.Thesixth,seventh,andeighthbytesareusedforinternalcomputations,andthuswillnotreadoutanypredictablepattern.ItisimperativethatonewritesTH,TL,andconfiginsuccession;i.e.awriteisnotvalidifonewritesonlytoTHandTL,forexample,andthenissuesareset.Ifanyofthesebytesmustbewritten,allthreemustbewrittenbeforearesetisissued.ThereisaninthbytewhichmaybereadwithaReadScratchpad[BEh]command.Thisbytecontainsacyclicredundancycheck(CRC)bytewhichistheCRCoveralloftheeightpreviousbytes.ThisCRCisimplementedinthefashiondescribedinthesectiontitled“CRCGeneration”.

DS18B20的研究与应用DS18B20的通信是通过一个1-Wire端口。与1-Wire端口,内存和控制功能将无法使用以前的ROM功能协议已经成立。主机必须首先提供五种ROM操作命令之一:1)读ROM,2)MatchROM命令,3)搜索ROM,4)跳过ROM或5)报警搜索。这些命令运行在64位光刻ROM部分。设备和能出一个特定的设备很多都是单一的,如果在1-Wire总线以及说明目前的主机有多少,哪些类型的设备都存在。经过ROM操作序列已成功地执行,内存和控制功能的主机可以访问和再提供任何六个内存和控制功能命令之一。一个控制功能命令指示执行DS18B20的温度测量。这一测量结果将被放置在传感器DS18B20的便签内存,并且可以通过发出命令,读取记忆功能的暂存存储器的内容读。温度报警触发器TH和TL的1个字节的EEPROM每个组成。如果报警搜索命令不适用于DS18B20的,这些寄存器可以作为通用的用户存储器。暂存器还包含一个配置字节来设置所需的温度分辨率的数字转换。写作治疗,热释光,配置字节是通过使用一个存储器功能命令。读访问这些寄存器是通过暂存器。所有数据读取和写入最低有效位在前。为了传感器DS18B20的能够进行精确的温度转换,必须提供充足的电力过的电话号码查询线时温度转换正在发生。由于经营的DS18B20的电流可达1.5mA的时,电话查号线将不会有足够的驱动由于5公里的上拉电阻。这个问题尤其严重,如果几个DS18B20s在同一电话号码查询和试图转换同时进行。有两种方法,以确保DS18B20的过程中有其积极转换周期足够的电源电流。第一是要提供一个强大的DQ线拉每当温度转换或拷贝到E2的内存都在发生。这可能是通过使用一个MOSFET拉的DQ线直接供电,如图2所示。的DQ线路必须在10切换到强的最大上拉后发出任何协议,涉及复制到E2的内存或启动温度转换。当使用寄生供电模式,在VDD引脚必须接地。另一个供应电流DS18B20的方法是通过一个外部电源连接到VDD端子的供应使用。对这样做的好处是,强拉未上线所需的DQ,总线主机不必束缚抱着这条线在温度conversions.This允许在高的1-Wire总线的转换时间,在其他数据流量。此外,任何DS18B20s人数可能被放置在1-Wire总线,如果它们都使用外接电源,它们都可能同时执行通过发出跳过ROM命令,然后转换T命令发出温度转换。请注意,只要外部电源处于活动状态,GND引脚可能不浮动。该DS18B20的核心功能是它直接对数字温度传感器。该DS18B20的分辨率配置(9,10,11或12位)与12位读数,出厂默认状态。这相当于0.5C的,0.25C的,0.125C或0.0625温度分辨率三继转换T发行[44高]命令,执行温度转换,热数据存储在16位暂存器记忆体,符号扩展的二进制补码格式。温度信息可以检索通过1-Wire接口发出一个读取暂存器[北京控股]命令一次转换已完成。数据传输通过1-Wire总线,LSB在前。对温度寄存器的MSB中包含“符号“(s第)位,表示是否为正温度

或负数。每个DS18B20

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论