DS18B20毕业论文外文翻译_第1页
DS18B20毕业论文外文翻译_第2页
DS18B20毕业论文外文翻译_第3页
DS18B20毕业论文外文翻译_第4页
DS18B20毕业论文外文翻译_第5页
已阅读5页,还剩10页未读 继续免费阅读

付费下载

下载本文档

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

文档简介

1、河南科技大学本科毕业设计(论文)外文资料原文DS18B201.1DESCRIPTIONTheDS18B20DigitalThermometerprovides9to12-bit(configurable)temperaturereadings which indicate the temperature of the device.Informationis sentto/fromtheDS18B20overa 1-Wireinterface,so that onlyonewire(andground)needstobeconnectedfroma centralmicroprocessort

2、oa DS18B20.Power forreading,writing,andperforming temperatureconversionscan be derivedfromthe data line itself with no need for an external power source.BecauseeachDS18B20containsa unique siliconserialnumber, multipleDS18B20scanexistonthesame 1-Wire bus. Thisallowsforplacingtemperature sensors in ma

3、nydifferentplaces.ApplicationswherethisfeatureisusefulincludeHVACenvironmentalcontrols,sensingtemperaturesinsidebuildings,equipmentor machinery,and processmonitoring and control.1.2FEATURESUnique 1-WireTM interface requires only one port pin for communicationMultidrop capability simplifies distribut

4、ed temperature sensing applicationsRequires no external componentsCan be powered from data line. Power supply range is 3.0V to 5.5VZero standby power requiredMeasures temperatures from -55 C to+125 C. Fahrenheit equivalent is -67 F to+257 F(7)0.5C accuracy from-10C to +85CThermometer resolution is p

5、rogrammable from 9 to 12 bitsConverts 12-bit temperature to digital word in 750 ms (max.)User-definable, nonvolatile temperature alarm settings1河南科技大学本科毕业设计(论文)Alarm search command identifies and addresses devices whose temperature is outside of programmed limits (temperature alarm condition)Applica

6、tions include thermostatic controls, industrial systems, consumer products, thermometers, or any thermally sensitive system1.3PINASSIGNMENTDETAILEDPINDESCRIPTIONTable1DS18B20Z(8-pinSOIC)and DS18P20P(TSOC):Allpins not specifiedin this tableare not to be connected.1.4OVERVIEWThe block diagramof Figure

7、 1shows the major components ofthe DS18B20. TheDS18B20 has four main data components: 1) 64-bit lasered ROM, 2) temperature sensor, 3)nonvolatiletemperaturealarmtriggersTHand TL,and 4) a configurationregister.The2河南科技大学本科毕业设计(论文)device derives its power from the 1-Wire communication line by storing

8、energy on an internal capacitor during periods of time when the signal line is high and continues to operate off this power source during the low times of the 1-Wire line until it returns high toreplenish the parasite (capacitor) supply. As an alternative, the DS18B20 may also be powered from an ext

9、ernal 3V - 5.5V supply.DS18B20BLOCKDIAGRAMFigure1Communication totheDS18B20is via a1-Wire port. Withthe 1-Wireport,thememory and control functions will not be available before the ROM function protocol hasbeenestablished.The master must first provideone offiveROMfunctioncommands:1)ReadROM, 2) MatchR

10、OM, 3) Search ROM,4)SkipROM,or5)AlarmSearch. Thesecommands operate on the 64-bit lasered ROM portion of each device and can single out aspecific device if many are present on the 1-Wire line as well as indicate to the bus masterhow many and what types of devices are present. After a ROM function seq

11、uence has beensuccessfully executed, the memory and control functions are accessible and the master maythen provide any one of the six memory and control function commands.One controlfunctioncommandinstructsthe DS18B20toperforma temperaturemeasurement. The resultof this measurement will be placed in

12、 the DS18B20 -spadscratchmemory, and may be read by issuing a memory function command which reads the contentsof the scratchpadmemory. The temperature alarm triggers THandTL consistof 1 byteEEPROM each. If the alarm search command is not applied to the DS18B20, these registersmay be used as general

13、purpose user memory. The scratchpad also contains a configurationbyte to set the desired resolution of the temperature to digital conversion. Writing TH, TL,3河南科技大学本科毕业设计(论文)and the configuration byte is done using a memory function command. Read access to these registers is through the scratchpad.

14、All data is read and written least significant bit first.1.5PARASITEPOWERThe blockdiagram(Figure1) showsthe parasite-poweredcircuitry.Thiscircuitry“ steals ” powhenever the DQ or VDD pins are high. DQ will provide sufficient power aslongasthespecifiedtimingandvoltagerequirementsaremet(see thesection

15、titled“1-Wire Bus System” ). The advantages of parasite power are twofold: 1) by parasiting offthispin,nolocalpower source is needed for remote sensing oftemperature,and2)theROM may be read in absence of normal power.InorderfortheDS18B20tobe ableto perform accuratetemperatureconversions,sufficientpo

16、wermust beprovidedover the DQ line whenatemperatureconversionistaking place. Since the operating current of the DS18B20 is up to 1.5 mA, the DQ line willnot have sufficient drive due to the 5k pullup resistor. This problem is particularly acute ifseveral DS18B20s are on the same DQ and attempting to

17、 convert simultaneously.There are two ways to assure that the DS18B20 has sufficient supply current during itsactiveconversioncycle.Thefirstis toprovidea strongpullup on the DQ line whenevertemperatureconversionsorcopiestotheE2memoryaretaking place. This may beaccomplishedbyusinga MOSFETtopulltheDQ

18、linedirectlyto the power supply asshowninFigure2. TheDQlinemustbeswitchedovertothestrongpullupwithin10 smaximumafter issuingany protocolthatinvolvescopyingtotheE2memoryorinitiatestemperature conversions. When using the parasite power mode, the VDD pin must be tied toground.Another method of supplyin

19、g current to the DS18B20 is through the use of an externalpower supply tied to the VDD pin, as shown in Figure 3. The advantage to this is that thestrong pullup is not required on the DQ line, and the bus master need not be tied up holdingthatlinehigh duringtemperatureconversions.This allows otherda

20、tatrafficon the1 -Wirebus during the conversion time. In addition, any number of DS18B20s may be placed on the1-Wirebus,andiftheyalluseexternalpower,theymayallimultaneouslyperform4河南科技大学本科毕业设计(论文)temperature conversions by issuing the Skip ROM command and then issuing theConvert Tcommand. Note that

21、as long as the external power supply is active, the GND pinmay not befloating.The use of parasite power is not recommended above 100C, since it may not be ableto sustain communications given the higher leakage currents the DS18B20 exhibits at thesetemperatures.Forapplicationsinwhichsuchtemperaturesa

22、relikely,itisstronglyrecommended that VDD be applied to the DS18B20.For situations where the bus master does not know whether the DS18B20s on the busare parasite powered or supplied with external VDD, a provision is made in the DS18B20 tosignal the power supply scheme used. The bus master can determ

23、ine if anyDS18B20s areon the bus which require the strong Pull up by sending a Skip ROM protocol, then issuing the read power supply command. After this command is issued, the master then issues readtime slots. The DS18B20 will send back“ 0” on the-Wire1bus if it is parasite powered; itwillsendbacka

24、 “ 1”ifitis powered fromthe V DDpin.Ifthe masterreceives a “ 0”it,knows that it must supply the strong pullup on the DQ line during temperatureconversions.See“ MemoryCommand Functions ” section for more detail on this command protocol.STRONGPULLUP FORSUPPLYINGDS18B20DURINGTEMPERATURECONVERSIONFigure

25、2USINGVDDTOSUPPLYTEMPERATURECONVERSIONCURRENTFigure35河南科技大学本科毕业设计(论文)1.6OPERATION-ALARMSIGNALINGAfter the DS18B20 has performed a temperature conversion, the temperature value iscomparedtothe triggervalues storedin TH and TL. Since theseregistersare 8-bitonly,bits9-12are ignoredforcomparison.The mos

26、t significantbitofTHor TLdirectlycorresponds to the sign bit of the 16-bit temperature register. If the result of a temperaturemeasurement is higher than TH or lower than TL, an alarm flag inside the device is set. Thisflag is updatedwith everytemperaturemeasurement. Aslongas the alarmflagisset, the

27、DS18B20willrespondto the alarm searchcommand. Thisallowsmany DS18B20stobeconnectedinparalleldoing simultaneoustemperaturemeasurements.Ifsomewherethetemperatureexceedsthelimits,thealarming device(s)canbe identifiedandrea dimmediately without having to read non-alarming devices.1.764-BITLASEREDROMEach

28、 DS18B20 contains a unique ROM code that is 64-bits long. The first 8 bits are a1-Wire family code (DS18B20 code is 28h). The next 48 bits are a unique serial number. The last 8 bits are a CRC of the first 56 bits. (See Figure 4.) The 64-bit ROM and ROM Function Control section allow the DS18B20 to

29、operate as a 1-Wire device and follow the1- Wireprotocoldetailedinthe section“1-Wire BusSystem ”.Thefunctionsrequired tocontrolsectionsoftheDS18B20are not accessible until the ROMfunctionprotocolhasbeen satisfied. This protocol is described in the ROM function protocol flowchart (Figure 5).The 1-Wir

30、e bus mastermust firstprovide one of fiveROM functioncommands:1)ReadROM,2) MatchROM,3)Search ROM,4) Skip ROM, or 5) AlarmSearch. Aftera ROMfunctionsequencehas beensuccessfullyexecuted, the functionsspecific to the DS18B20are accessible andthebusmastermaythen provideone of thesixmemoryandcontrolfunct

31、ion commands.64-BITLASEREDROMFigure46河南科技大学本科毕业设计(论文)1.8CRCGENERATIONThe DS18B20 has an 8-bit CRC stored in the most significant byte of the 64-bit ROM.The bus master can computea CRCvalue fromthe first56-bitsof the 64-bitROMandcompare it to the value stored within the DS18B20 to determine if the RO

32、M data has beenreceived error-free by the bus master. The equivalent polynomial function of this CRC is:CRC=X8+X5+X4+1The DS18B20 also generates an 8-bit CRC value using the same polynomial functionshown above and provides this value to the bus master to validate the transfer of data bytes.In each c

33、ase where a CRC is used for data transfer validation, the bus master must calculatea CRC value using the polynomial function given above and compare the calculated valueto either the 8-bit CRC value stored in the 64-bit ROM portion of the DS18B20 (for ROMreads) or the 8-bit CRC value computed within

34、 the DS18B20 (which is read as a ninth bytewhen the scratchpad is read). The comparison of CRC values and decision to continue withan operationare determinedentirelyby the bus master. Thereis no circuitryinsidetheDS18B20that preventsa commandsequence fromproceedingifthe CRCstoredin orcalculated by t

35、he DS18B20 does not match the value generated by the bus master.The 1-Wire CRCcan be generated using a polynomialgenerator consistingof a shiftregisterand XORgates as shownin Figure5. Additionalinformationaboutthe Dallas1-WireCyclicRedundancyCheckisavailableinApplicationNote27entitled“ Understanding

36、 and Using Cyclic Redundancy Checks with Dallas Semiconductor Touch Memory Products ”.The shift register bits are initialized to 0. Then starting with the least significant bit of the family code, 1bit at a time is shifted in. After the eighth bit of the family code has been entered, then the serial

37、 number is entered. After the 48th bit of the serial number has beenentered, the shift register contains the CRC value. Shifting in the 8 bits of CRC should return the shift register to all 0 s.1.91-WIREBUSSYSTEMThe 1-Wire bus is a system which has a single bus master and one or more slaves. The7河南科

38、技大学本科毕业设计(论文)DS18B20 behaves as a slave. The discussion of this bus system is broken down into threetopics: hardware configuration, transaction sequence, and 1-Wire signaling (signal types and timing).1-WIRECRCCODEFigure52.0TRANSACTIONSEQUENCEThe protocol for accessing the DS18B20 via the 1-Wire por

39、t is as follows:1) Initialization2) ROM Function Command3) Memory Function Command4) Transaction/Data8河南科技大学本科毕业设计(论文)外文资料译文DS18B20一概述1.1一般说明DS18B20数字温度计提供9到 12 位温度读数,指示器件的温度。信息经过单线接口送入DS18B20或从 DS18B20送出,因此从中央处理器到DS18B20仅需连接一条线和地读写和完成温度变换所需的电源可以由数据线本身提供而不需要外部电源。因为每一个DS18B20有唯一的系列号(silicon serial nu

40、mber),因此多个DS18B20可以存在于同一条单线总线上。这允许在许多不同的地方放置温度灵敏器件。此特性的应用范围包括HVAC 环境控制,建筑物、设备或机械内的温度检测,以及过程监视和控制中的温度检测。1.2特性独特的单线接口,只需1个接口引脚,即可通信。多点 (multidrop) 能使分布式温度检测应用得以简化。不需要外部元件。(4)可用数据线供电,供电电压为3.0V 到 5.5V 。不需备份电源。(6)测量范围从-55 至 +125增量值为0.5等效的华氏温度范围是-67 F至 257 F。以 9 或 12 位数字值方式读出温度。在 -10 +85 时精度为 0.5 。12 位分辨率

41、时最多在750ms 内把温度值转换为数字。用 户可定义的非易失性的温度告警设置。告 警搜索命令识别和寻址温度在编定的极限之外的器件温度告警情况。应 用范围包括恒温控制工业系统消费类产品温度计或任何热敏系统。9河南科技大学本科毕业设计(论文)1.3引脚排列1.4详细的引脚说明引脚引脚 8符号说明PR35脚 SOIC14GND地35DQ单线应用的数据输入/出引脚漏极开路见“寄生电源” 一节。36V DD可选 V DD 引脚,有关连接的细节见“寄生电源“一节。1.5详细说明图 1 的方框图表示DS18B20的主要部件。DS18B20有三个主要的数据部件:1)64位激光ROM ; 2) 温度灵敏元件;

42、3) 非易失性温度告警触发器TH和 TL。器件从单线的通信线取得其电源,在信号线为高电平的时间周期内,把能量贮存在内部的电容器中,在单信号线为低电平的时间期内断开此电源,直到信号线变为高电平重新接上寄生电容电源为止。作为另一种可供选择的方法DS18B20也可用外部5V电源供电。与 DS18B20的通信经过一个单线接口。在单线接口情况下,在ROM操作未定建立之前不能使用存贮器和控制操作。主机必须首先提供五种ROM操作命令之一:1 )Read ROM(读 ROM) ,2)Match ROM(符合 ROM),3)Search ROM(搜索 ROM),4)Skip10河南科技大学本科毕业设计(论文)R

43、OM( 跳过 ROM), 或 5)Alarm Search(告警搜索) 。这些命令对每一器件的64 位激光 ROM部分进行操作。如果在单线上有许多器件,那么可以挑选出一个特定的器件,并给总线上的主机指示存在多少器件及其类型。在成功地执行了ROM操作序列之后,可使用存贮器和控制操作,然后主机可以提供六种存贮器和控制操作命令之一。一个控制操作命令指示DS18B20完成温度测量。该测量的结果将放入DS18B20的高速暂存( 便笺式 ) 存贮器 (Scratchpad memory ),通过发出读暂存存储器内容的存储器操作命令可以读出此结果。每一温度告警触发器TH和 TL构成一个字节的EEPROM。如

44、果不对DS18B20施加告警搜索命令,这些寄存器可用作通用用户存储器使用存储器.操作命令可以写TH和 TL 。 对这些寄存器的读访问,通过便笺存储器。所有数据均以最低有效位在前的方式被读写。图 1 DS18B20 的方框图1.5寄生电源 (parasite power)方框图 (图 1) 示出寄生电源电路。当I/O或 VDD引脚为高电平时,这个电路便取得电源。 只要符合指定的定时和电压要求,I/O将提供足够的功率(标题为 “单总线系统”一节)。寄生电源的优点是双重的:1) 利用此引脚,远程温度检测无需本地电源,2)缺少正常电源条件下也可以读ROM 。为了使 DS18B20能完成准确的温度变换,

45、当温度变换发生时,I/O线上必须提供足够的功率。因为DS18B20的工作电流高达1mA , 5K的上拉电阻将使I/O线没有足够的驱动能力。如果几个DS18B20在同一条I/O线上而且企图同时变换,那么这一问11河南科技大学本科毕业设计(论文)题将变得特别尖锐。有两种方法确保DS18B20在其有效变换期内得到足够的电源电流。第一种方法是发生温度变换时,在 I/O线上提供一强的上拉。如图 2 所示, 通过使用一个MOSFET把I/O线直接拉到电源可达到这一点。当使用寄生电源方式时VDD引脚必须连接到地。向 DS18B20供电的另外一种方法是通过使用连接到VDD引脚的外部电源,如图3所示。 这种方法

46、的优点是在I/O线上不要求强的上拉。总线上主机不需向上连接便在温度变换期间使线保持高电平。这就允许在变换时间内其它数据在单线上传送。此外,在单线总线上可以放置任何数目的DS18B20 ,而且如果它们都使用外部电源,那么通过发出跳过(Skip) ROM命令和发出变换(Convert) T命令 ,可以同时完成温度变换。注意只要外部电源处于工作状态,GND(地)引脚不可悬空。图 2 强上拉在温度变换期内向DS18B20供电图 3使用 VDD提供温度变换所需电流1.6运用告警信号在 DS18B20完成温度变换之后,温度值与贮存在TH和 TL内的触发值相比较。因为这些寄存器仅仅是8 位,所以0.5位在比较时被忽略。TH或 TL的最高有较位直接对应于16 位温度寄存器的符号位。如果温度测量的结果高于

温馨提示

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

评论

0/150

提交评论