关于DS18B20的外文翻译

上传人:沈*** 文档编号:123230550 上传时间:2022-07-22 格式:DOC 页数:12 大小:97.50KB
收藏 版权申诉 举报 下载
关于DS18B20的外文翻译_第1页
第1页 / 共12页
关于DS18B20的外文翻译_第2页
第2页 / 共12页
关于DS18B20的外文翻译_第3页
第3页 / 共12页
资源描述:

《关于DS18B20的外文翻译》由会员分享,可在线阅读,更多相关《关于DS18B20的外文翻译(12页珍藏版)》请在装配图网上搜索。

1、本科生毕业设计(论文)外文翻译毕设题目:冷库温度控制系统的无线传感器节点设计译文题目:DS18B20 单线温度传感器外文题目:DS18B20 Single - wire temperature sensor学 院: 信息科学与工程学院 专业班级: 电子信息工程0804班 学生姓名: 指导教师: DS18B20 Single - wire temperature sensor一. FEATURES Unique 1-Wireinterface requires only one port pin for communication Each device has a unique 64-bit

2、serial code stored in an onboard ROM Multidrop capability simplifies distributed temperature sensing applications Requires no external components Can be powered from data line. Power supply range is 3.0V to 5.5V Measures temperatures from 55C to +125C (67F to +257F) 0.5C accuracy from 10C to +85C Th

3、ermometer resolution is user-selectable from 9 to 12 bits Converts temperature to 12-bit digital word in 750ms (max.) User-definable nonvolatile (NV) alarm settings Alarm search command identifies and addresses devices whose temperature is outside of programmed limits (temperature alarm condition) A

4、vailable in 8-pin SO (150mil), 8-pin SOP, and 3-pin TO-92 packages Software compatible with the DS1822 Applications include thermostatic controls, industrial systems, consumerproducts, thermometers, or any thermally sensitive二. DESCRIPTION The DS18B20 Digital Thermometer provides 9 to 12bit centigra

5、de temperature measurements and has an alarm function with nonvolatile user-programmable upper and lower trigger points. The DS18B20 communicates over a 1-Wire bus that by definition requires only one data line (and ground) for communication with a central microprocessor. It has an operating tempera

6、ture range of 55C to +125Cand is accurate to 0.5C over the range of 10C to +85C. In addition, the DS18B20 can derive powerdirectly from the data line (“parasite power”), eliminating the need for an external power supply. Each DS18B20 has a unique 64-bit serial code, which allows multiple DS18B20s to

7、 function on the same 1wire bus; thus, it is simple to use one microprocessor to control many DS18B20s distributed over a large area. Applications that can benefit from this feature include HVAC environmental controls, temperature monitoring systems inside buildings, equipment or machinery, and proc

8、ess monitoring and control systems.三. OVERVIEWFigure 1 shows a block diagram of the DS18B20, and pin descriptions are given in Table 1. The 64-bit ROM stores the devices unique serial code. The scratchpad memory contains the 2-byte temperature register that stores the digital output from the tempera

9、ture sensor. In addition, the scratchpad provides access to the 1-byte upper and lower alarm trigger registers (TH and TL), and the 1-byte configuration register. The configuration register allows the user to set the resolution of the temperature-to-digital conversion to 9, 10, 11, or 12 bits. The T

10、H, TL and configuration registers are nonvolatile (EEPROM), so they will retain data when the device is powered down.The DS18B20 uses Dallas exclusive 1-Wire bus protocol that implements bus communication using one control signal. The control line requires a weak pullup resistor since all devices ar

11、e linked to the bus via a 3-state or open-drain port (the DQ pin in the case of the DS18B20). In this bus system, the microprocessor (the master device) identifies and addresses devices on the bus using each devices unique 64-bit code. Because each device has a unique code, the number of devices tha

12、t can be addressed on one bus is virtually unlimited. The 1-Wire bus protocol, including detailed explanations of the commands and “time slots,” is covered in the 1-WIRE BUS SYSTEM section of this datasheet。 Another feature of the DS18B20 is the ability to operate without an external power supply. P

13、ower is instead supplied through the 1-Wire pullup resistor via the DQ pin when the bus is high. The high bus signal also charges an internal capacitor (CPP), which then supplies power to the device when the bus is low. This method of deriving power from the 1-Wire bus is referred to as “parasite po

14、wer.” As an alternative, the DS18B20 may also be powered by an external supply on VDD。四. OPERATION MEASURING TEMPERATURE The core functionality of the DS18B20 is its direct-to-digital temperature sensor. The resolution of the temperature sensor is user-configurable to 9, 10, 11, or 12 bits, correspo

15、nding to increments of 0.5 C, 0.25 C, 0.125 C, and 0.0625 C, respectively. The default resolution at power-up is 12-bit. The DS18B20 powers-up in a low-power idle state; to initiate a temperature measurement and A-to-D conversion, the master must issue a Convert T 44h command. Following the conversi

16、on, the resulting thermal data is stored in the 2-byte temperature register in the scratchpad memory and the DS18B20 returns to its idle state. If the DS18B20 is powered by an external supply, the master can issue “read time slots” (see the 1-WIRE BUS SYSTEM section) after the Convert T command and

17、the DS18B20 will respond by transmitting 0 while the temperature conversion is in progress and 1 when the conversion is done. If the DS18B20 is powered with parasite power, this notification technique cannot be used since the bus must be pulled high by a strong pullup during the entire temperature c

18、onversion. The bus requirements for parasite power are explained in detail in the POWERING THE DS18B20 section of this datasheet。 The DS18B20 output temperature data is calibrated in degrees centigrade; for Fahrenheit applications, a lookup table or conversion routine must be used. The temperature d

19、ata is stored as a 16-bit sign-extended twos complement number in the temperature register (see Figure 2). The sign bits (S) indicate if the temperature is positive or negative: for positive numbers S = 0 and for negative numbers S = 1. If the DS18B20 is configured for 12-bit resolution, all bits in

20、 the temperature register will contain valid data. For 11-bit resolution, bit 0 is undefined. For 10-bit resolution, bits 1 and 0 are undefined, and for 9-bit resolution bits 2, 1 and 0 are undefined. Table 2 gives examples of digital output data and the corresponding temperature reading for 12-bit

21、resolution conversions。五. OPERATION ALARM SIGNALINGAfter the DS18B20 performs a temperature conversion, the temperature value is compared to the user-defined twos complement alarm trigger values stored in the 1-byte TH and TL registers (see Figure 3). The sign bit (S) indicates if the value is posit

22、ive or negative: for positive numbers S = 0 and for negative numbers S = 1. The TH and TL registers are nonvolatile (EEPROM) so they will retain data when the device is powered down. TH and TL can be accessed through bytes 2 and 3 of the scratchpad as explained in the MEMORY section of this datashee

23、t。六. TH AND TL REGISTER FORMAT Figure 3Only bits 11 through 4 of the temperature register are used in the TH and TL comparison since TH and TL are 8-bit registers. If the measured temperature is lower than or equal to TL or higher than TH, an alarm condition exists and an alarm flag is set inside th

24、e DS18B20. This flag is updated after every temperature measurement; therefore, if the alarm condition goes away, the flag will be turned off after the next temperature conversion. The master device can check the alarm flag status of all DS18B20s on the bus by issuing an Alarm Search ECh command. An

25、y DS18B20s with a set alarm flag will respond to the command, so the master can determine exactly which DS18B20s have experienced an alarm condition. If an alarm condition exists and the TH or TL settings have changed, another temperature conversion should be done to validate the alarm condition。七.

26、POWERING THE DS18B20 The DS18B20 can be powered by an external supply on the VDD pin, or it can operate in “parasite power” mode, which allows the DS18B20 to function without a local external supply. Parasite power is very useful for applications that require remote temperature sensing or that are v

27、ery space constrained. Figure 1 shows the DS18B20s parasite-power control circuitry, which “steals” power from the 1-Wire bus via the DQ pin when the bus is high. The stolen charge powers the DS18B20 while the bus is high, and some of the charge is stored on the parasite power capacitor (CPP) to pro

28、vide power when the bus is low. When the DS18B20 is used in parasite power mode, the VDD pin must be connected to ground. In parasite power mode, the 1-Wire bus and CPP can provide sufficient current to the DS18B20 for most operations as long as the specified timing and voltage requirements are met

29、(refer to the DC ELECTRICAL CHARACTERISTICS and the AC ELECTRICAL CHARACTERISTICS sections of this data sheet).However, when the DS18B20 is performing temperature conversions or copying data from the scratchpad memory to EEPROM, the operating current can be as high as 1.5mA. This current can cause a

30、n unacceptable voltage drop across the weak 1-Wire pullup resistor and is more current than can be supplied by CPP. To assure that the DS18B20 has sufficient supply current, it is necessary to provide a strong pullup on the 1-Wire bus whenever temperature conversions are taking place or data is bein

31、g copied from the scratchpad to EEPROM. This can be accomplished by using a MOSFET to pull the bus directly to the rail as shown in Figure 4. The 1-Wire bus must be switched to the strong pullup within 10s (max) after a Convert T 44h or Copy Scratchpad 48h command is issued, and the bus must be held

32、 high by the pullup for the duration of the conversion (tconv) or data transfer (twr = 10ms). No other activity can take place on the 1-Wire bus while the pullup is enabled. The DS18B20 can also be powered by the conventional method of connecting an external power supply to the VDD pin, as shown in

33、Figure 5. The advantage of this method is that the MOSFET pullup is not required, and the 1-Wire bus is free to carry other traffic during the temperature conversion time. The use of parasite power is not recommended for temperatures above +100C since the DS18B20 may not be able to sustain communica

34、tions due to the higher leakage currents that can exist at these temperatures. For applications in which such temperatures are likely, it is strongly recommended that the DS18B20 be powered by an external power supply. In some situations the bus master may not know whether the DS18B20s on the bus ar

35、e parasite powered or powered by external supplies. The master needs this information to determine if the strong bus pullup should be used during temperature conversions. To get this information, the master can issue a Skip ROM CCh command followed by a Read Power Supply B4h command followed by a “r

36、ead time slot”. During the read time slot, parasite powered DS18B20s will pull the bus low, and externally powered DS18B20s will let the bus remain high. If the bus is pulled low, the master knows that it must supply the strong pullup on the 1-Wire bus during temperature conversions.八. 64-BIT LASERE

37、D ROM CODE Each DS18B20 contains a unique 64bit code (see Figure 6) stored in ROM. The least significant 8 bits of the ROM code contain the DS18B20s 1-Wire family code: 28h. The next 48 bits contain a unique serial number. The most significant 8 bits contain a cyclic redundancy check (CRC) byte that

38、 is calculated from the first 56 bits of the ROM code. A detailed explanation of the CRC bits is provided in the CRC GENERATION section. The 64-bit ROM code and associated ROM function control logic allow the DS18B20 to operate as a 1-Wire device using the protocol detailed in the 1-WIRE BUS SYSTEM

39、section of this datasheet.九. MEMORY The DS18B20s memory is organized as shown in Figure 7. The memory consists of an SRAM scratchpad with nonvolatile EEPROM storage for the high and low alarm trigger registers (TH and TL) and configuration register. Note that if the DS18B20 alarm function is not use

40、d, the TH and TL registers can serve as general-purpose memory. All memory commands are described in detail in the DS18B20 FUNCTION COMMANDS section. Byte 0 and byte 1 of the scratchpad contain the LSB and the MSB of the temperature register, respectively. These bytes are read-only. Bytes 2 and 3 pr

41、ovide access to TH and TL registers. Byte 4 contains the configuration register data, which is explained in detail in the CONFIGURATION REGISTER section of this datasheet. Bytes 5, 6, and 7 are reserved for internal use by the device and cannot be overwritten; these bytes will return all 1s when rea

42、d. Byte 8 of the scratchpad is read-only and contains the cyclic redundancy check (CRC) code for bytes 0 through 7 of the scratchpad. The DS18B20 generates this CRC using the method described in the CRC GENERATION section. Data is written to bytes 2, 3, and 4 of the scratchpad using the Write Scratc

43、hpad 4Eh command; the data must be transmitted to the DS18B20 starting with the least significant bit of byte 2. To verify data integrity, the scratchpad can be read (using the Read Scratchpad BEh command) after the data is written. When reading the scratchpad, data is transferred over the 1-Wire bu

44、s starting with the least significant bit of byte 0. To transfer the TH, TL and configuration data from the scratchpad to EEPROM, the master must issue the Copy Scratchpad 48h command. Data in the EEPROM registers is retained when the device is powered down; at power-up the EEPROM data is reloaded i

45、nto the corresponding scratchpad locations. Data can also be reloaded from EEPROM to the scratchpad at any time using the Recall E2B8h command. The master can issue read time slots following the Recall E2command and the DS18B20 will indicate the status of the recall by transmitting 0 while the recal

46、l is in progress and 1 when the recall is done.十. CONFIGURATION REGISTER Byte 4 of the scratchpad memory contains the configuration register, which is organized as illustrated in Figure 8. The user can set the conversion resolution of the DS18B20 using the R0 and R1 bits in this register as shown in

47、 Table 3. The power-up default of these bits is R0 = 1 and R1 = 1 (12-bit resolution). Note that there is a direct tradeoff between resolution and conversion time. Bit 7 and bits 0 to 4 in the configuration register are reserved for internal use by the device and cannot be overwritten; these bits wi

48、ll return 1s when read.十一. CRC GENERATION CRC bytes are provided as part of the DS18B20s 64-bit ROM code and in the 9thbyte of the scratchpad memory. The ROM code CRC is calculated from the first 56 bits of the ROM code and is contained in the most significant byte of the ROM. The scratchpad CRC is

49、calculated from the data stored in the scratchpad, and therefore it changes when the data in the scratchpad changes. The CRCs provide the bus master with a method of data validation when data is read from the DS18B20. To verify that data has been read correctly, the bus master must re-calculate the

50、CRC from the received data and then compare this value to either the ROM code CRC (for ROM reads) or to the scratchpad CRC (for scratchpad reads).If the calculated CRC matches the read CRC, the data has been received error free. The comparison of CRC values and the decision to continue with an opera

51、tion are determined entirely by the bus master.There is no circuitry inside the DS18B20 that prevents a command sequence from proceeding if the DS18B20 CRC (ROM or scratchpad) does not match the value generated by the bus master. The equivalent polynomial function of the CRC (ROM or scratchpad) is:

52、The bus master can re-calculate the CRC and compare it to the CRC values from the DS18B20 using the polynomial generator shown in Figure 9. This circuit consists of a shift register and XOR gates, and the shift register bits are initialized to 0. Starting with the least significant bit of the ROM co

53、de or the least significant bit of byte 0 in the scratchpad, one bit at a time should shifted into the shift register. After shifting in the 56thbit from the ROM or the most significant bit of byte 7 from the scratchpad, the polynomial generator will contain the re-calculated CRC. Next, the 8-bit RO

54、M code or scratchpad CRC from the DS18B20 must be shifted into the circuit. At this point, if the re-calculated CRC was correct, the shift register will contain all 0s. Additional information about the Dallas 1-Wire cyclic redundancy check is available in Application Note 27: Understanding and Using

55、 Cyclic Redundancy Checks with Dallas Semiconductor Touch Memory Products. DS18B20 单线温度传感器一特征: 独特的单线接口,只需 1 个接口引脚即可通信 每个设备都有一个唯一的64位串行代码存储在光盘片上 多点能力使分布式温度检测应用得以简化 不需要外部部件 可以从数据线供电,电源电压范围为3.0V至5.5V 测量范围从-55 C 至+125 C(-67 F至257 F),从-10至+85 C的精度为0.5 C 温度计分辨率是用户可选择的9至12位 转换12位数字的最长时间是750ms 用户可定义的 非易失性的温

56、度告警设置 告警搜索命令识别和寻址温度在编定的极限之外的器件 (温度告警情况) 采用8引脚SO(150mil),8引脚SOP和3引脚TO - 92封装 软件与DS1822兼容 应用范围包括恒温控制 工业系统 消费类产品 温度计或任何热敏系统二简介该DS18B20的数字温度计提供9至12位的摄氏温度测量,并具有与非易失性用户可编程上限和下限报警功能。信息单线接口送入 DS1820 或从 DS1820 送出,因此按照定义只需要一条数据线(和地线)与中央微处理器进行通信。它的测温范围从-55 C到 +125 C,其中从-10 C至+85 C可以精确到0.5C 。此外,DS18B20可以从数据线直接供

57、电(“寄生电源”),从而消除了供应需要一个外部电源。每个 DS18B20 的有一个唯一的64位序列码,它允许多个DS18B20s的功能在同一1-巴士线。因此,用一个微处理器控制大面积分布的许多DS18B20s是非常简单的。此特性的应用范围包括 HVAC、环境控制、建筑物、设备或机械内的温度检测以及过程监视和控制系统。三综述64位ROM存储设备的独特序号。存贮器包含2个字节的温度寄存器,它存储来自温度传感器的数字输出。此外,暂存器可以访问的1个字节的上下限温度告警触发器(TH和TL)和1个字节的配置寄存器。配置寄存器允许用户设置的温度到数字转换的分辨率为9,10,11或12位。TH,TL和配置寄

58、存器是非易失性的,因此掉电时依然可以保存数据。该DS18B20使用Dallas的单总线协议,总线之间的通信用一个控制信号就可以实现。控制线需要一个弱上拉电阻,因为所有的设备都是通过3线或开漏端口连接(在DS18B20中用DQ引脚)到总线的。在这种总线系统中,微处理器(主设备)和地址标识上使用其独有的64位代码。因为每个设备都有一个唯一的代码,一个总线上连接设备的数量几乎是无限的。 单总线协议,包括详细的解释命令和“时间槽”,此资料的单总线系统部分包括这些内容。DS18B20的另一个特点是:没有外部电源供电仍然可以工作。当DQ引脚为高电平时,电压是单总线上拉电阻通过DQ引脚供应的。高电平信号也可

59、以充当外部电源,当总线是低电平时供应给设备电压。这种从但总线提供动力的方法被称为“寄生电源“。作为替代电源,该DS18B20也可以使用连接到 VDD 引脚的外部电源供电。四运用 测量温度该DS18B20的核心功能是它是直接输出数字信号的温度传感器。该温度传感器的分辨率为用户配置至9,10,11或12位,相当于0.5 C,0.25 C,0.125 C和0.0625 C的增量。其中传感器默认为12位。该DS18B20在低功耗空闲状态;启动温度测量和模数转换,主机必须发出一个转换命令。转换后,所产生的数据存储在内存中的2比特温度寄存器中,DS18B20返回其空闲状态。如果DS18B20是由外部电源供

60、电的,主机可以发出“读时隙”,转换后,通过发送低电平T命令和DS18B20将响应,同时温度转换继续进行,当转换完成时变为高电平。如果DS18B20的是寄生电源供电的,在整个温度转换过程中此通知技术不能使用,因为总线必须变为高电平。总线需要寄生电源供电将在此资料的DS18B20驱动部分将详细介绍。 DS18B20的输出温度数据为标准摄氏度;对于华氏温度的应用,必须通过查表或运用转换方法。温度数据在温度寄存器存储为一个16位符号扩展位和2位的补码。该标志位(S)表示温度的正负符号位:为正数时S = 0,为负数时S = 1。如果是DS18B20配置为12位分辨率,在温度寄存器的所有位将包含有效数据。

61、对于11位分辨率,位0是未定义的。对于10位分辨率,位1和0是未定义的。对于9位分辨率,位2,1和0是未定义的。表2给出了输出数字数据和相应的12位分辨率温度读数转换例子。五运用 - 报警信号DS18B20温度转换完成后,温度值与用户定义的2个报警触发值存储在1个字节的TH和TL寄存器。符号位(S)表示温度值的正负: S = 0时为正值, S = 1为负值。TH和TL寄存器是非易失(EEPROM),因此他们将保留设备掉电时的数据。 TH和TL可通过暂存器中字节2和3获得,此内容在本数据表内存部分解释。六TH和TL寄存器格式只有温度寄存器4中的11位用于和TL的比较中,由于TH和TL都是 8位寄

62、存器。如果测量温度低于或等于TL或超过TH,报警情况存在而且报警标志将设置在DS18B20的内部。每个温度测量后,这个标志位将被更新,因此,如果报警条件消失,下一个温度转换后,该标志位将被关闭。主设备可以通过搜索ECH命令检查总线上所有DS18B20s报警标志位的状态。任何有设置报警标志位的DS18B20s将响应命令,所以主设备可以决定到底是哪个DS18B20s在经历一个报警条件。如果报警的情况存在,TH和TL设置已经改变了,另一个温度转换应该去验证报警条件。七DS18B20的驱动该传感器DS18B20可以用外部电源接VDD端供电,或者它可以工作在“寄生电源”模式下,这种模式允许DS18B20

63、在没有外部电源下工作。寄生电源在远程或者空间受限情况下感温是非常有用的。寄生功率控制电路,其中当总线引脚为高电平时,力部门宿舍从DS18B201通过连接单总线的DQ端“偷”电。当总线是高电平或者总线是低电平,而一些能量存贮在CPP中来提供电源,“偷”来的电位DS18B20提供驱动。当DS18B20在寄生电源模式下使用时,VDD引脚必须接地。在寄生电源模式下,单总线和CPP可以提供足够的电流给DS18B20的大部分操作,只要指定的时间和电压的要求得到满足(参考本数据手册DC电气特性和AC电气特性章节)。 然而,当DS18B20温度转换或复制暂存器的数据到EEPROM时,工作电流可高达1.5毫安。

64、这个电流会导致无法接受的电压下降,整个单总线电阻压降减小,更多的电流可以由寄生电源供应。为了确保DS18B20有足够的电流供应,无论正在发生温度转换或复制暂存器的数据到EEPROM,单总线都必须接一个强上拉电阻。这可以通过使用一个MOSFET以直接把总线电压下降到如图4所示。单总线必须在转换T44h或暂存器复制48H命令发出后, 10秒内(最大)转换到强上拉状态,而且总线必须在转换(tconv)或数据传输(twr = 10ms)期间通过上拉保持高电平。在单总线上拉使能时,其他活动不能发生。该DS18B20的也可以采用的连接外部电源到VDD脚上的传统方法。这种方法的优点是不需要MOSFET的上拉, 而且单总线可以在进行温度转换时间自由地进行其他操作。在+100以上的高温时不推荐使用寄生电源,因为在这些温度下存在较高泄漏电流,DS18B20可能无法维持通信。对于像在这种高温下的使用,强烈建议由一个DS18B20的外部电源供电。在某些情况下,总线主机可能不知道DS18B20s是外部电源还是寄生电源供电。主机需要这些信息来确定是否强大的总线上拉应在温度转换时使用。要获得这些信息,主机可以在 “阅读时段” 一个读取电源B4h命令后,发出一个跳过ROMCCh命令。在读时隙,寄生电源给DS18B20s供电将把总线电平拉低,外部供电

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

copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!