DS1820单总线数字温度计 单片机与电子技术专业毕业设计外文翻译-中英文对照.doc_第1页
DS1820单总线数字温度计 单片机与电子技术专业毕业设计外文翻译-中英文对照.doc_第2页
DS1820单总线数字温度计 单片机与电子技术专业毕业设计外文翻译-中英文对照.doc_第3页
DS1820单总线数字温度计 单片机与电子技术专业毕业设计外文翻译-中英文对照.doc_第4页
DS1820单总线数字温度计 单片机与电子技术专业毕业设计外文翻译-中英文对照.doc_第5页
已阅读5页,还剩1页未读 继续免费阅读

下载本文档

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

文档简介

外文资料 DS18B20 Programmable Resolution 1-Wire Digital ThermometerThe DS18B20 Digital Thermometer provides 9 to 12-bit (configurable) temperature readings which indicate the temperature of the device. Information is sent to/from the DS18B20 over a 1-Wire interface, so that only one wire (and ground) needs to be connected from a central microprocessor to a DS18B20. Power for reading, writing, and performing temperature conversions can be derived from the data line itself with no need for an external power source. Because each DS18B20 contains a unique silicon serial number, multiple DS18B20s can exist on the same 1-Wire bus. This allows for placing temperature sensors in many different places. Applications where this feature is useful include HVAC environmental controls, sensing temperatures inside buildings, equipment or machinery, and process monitoring and control.The block diagram of Figure 1 shows the major components of the DS18B20. The DS18B20 has four main data components: 1) 64-bit laser ROM, 2) temperature sensor, 3) nonvolatile temperature alarm triggers TH and TL, and 4) a configuration register. The device derives its power from the 1-Wire communication line by storing 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 to replenish the parasite (capacitor) supply. As an alternative, the DS18B20 may also be powered from an external 3V - 5.5V supply.Communication to the DS18B20 is via a 1-Wire port. With the 1-Wire port, the memory and control functions will not be available before the ROM function protocol has been established. The master must first provide one of five ROM function commands: 1) Read ROM, 2) Match ROM, 3) Search ROM, 4) Skip ROM, or 5) Alarm Search. These commands operate on the 64-bit laser ROM portion of each device and can single out a specific device if many are present on the 1-Wire line as well as indicate to the bus master how many and what types of devices are present. After a ROM function sequence has been successfully executed, the memory and control functions are accessible and the master may then provide any one of the six memory and control function commands. One control function command instructs the DS18B20 to perform a temperature measurement. The result of this measurement will be placed in the DS18B20s scratch-pad memory, and may be read by issuing a memory function command which reads the contents of the scratchpad memory. The temperature alarm triggers TH and TL consist of 1 byte EEPROM each. If the alarm search command is not applied to the DS18B20, these registers may be used as general purpose user memory. The scratchpad also contains a configuration byte to set the desired resolution of the temperature to digital conversion. Writing TH, TL, and the configuration byte is done using a memory function command. Read access to these registers is through the scratchpad. All data is read and written least significant bit first.The block diagram (Figure 1) shows the parasite-powered circuitry. This circuitry “steals” power whenever the DQ or VDD pins are high. DQ will provide sufficient power as long as the specified timing and voltage requirements are met (see the section titled “1-Wire Bus System”). The advantages of parasite power are twofold: 1) by parasiting off this pin, no local power source is needed for remote sensing of temperature, and 2) the ROM may be read in absence of normal power. In order for the DS18B20 to be able to perform accurate temperature conversions, sufficient power must be provided over the DQ line when a temperature conversion is taking place. Since the operating current of the DS18B20 is up to 1.5 mA, the DQ line will not have sufficient drive due to the 5k pull up resistor. This problem is particularly acute if several DS18B20s are on the same DQ and attempting to convert simultaneously.There are two ways to assure that the DS18B20 has sufficient supply current during its active conversion cycle. The first is to provide a strong pull up on the DQ line whenever temperature conversions or copies to the E2 memory are taking place. This may be accomplished by using a MOSFET to pull the DQ line directly to the power supply as shown in Figure 2. The DQ line must be switched over to the strong pull up within 10 us maximum after issuing any protocol that involves copying to the E2 memory or initiates temperature conversions. When using the parasite power mode, the VDD pin must be tied to ground. Another method of supplying current to the DS18B20 is through the use of an external power supply tied to the VDD pin, as shown in Figure 3. The advantage to this is that the strong pull up is not required on the DQ line, and the bus master need not be tied up holding that line high during temperature conversions. This allows other data traffic on the 1-Wire bus during the conversion time. In addition, any number of DS18B20s may be placed on the 1-Wire bus, and if they all use external power, they may all simultaneously perform temperature conversions by issuing the Skip ROM command and then issuing the Convert T command. Note that as long as the external power supply is active, the GND pin may not be floating. The use of parasite power is not recommended above 100C, since it may not be able to sustain communications given the higher leakage currents the DS18B20 exhibits at these temperatures. For applications in which such temperatures are likely, it is strongly recommended that VDD be applied to the DS18B20. For situations where the bus master does not know whether the DS18B20s on the bus are parasite powered or supplied with external VDD, a provision is made in the DS18B20 to signal the power supply scheme used. The bus master can determine if any DS18B20 are on 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 read time slots. The DS18B20 will send back “0” on the 1-Wire bus if it is parasite powered; it will send back a “1” if it is powered from the VDD pin. If the master receives a “0,” it knows that it must supply the strong pull up on the DQ line during temperature conversions. See “Memory Command Functions” section for more detail on this command protocol.The DS18B20 has an 8-bit CRC stored in the most significant byte of the 64-bit ROM. The bus master can compute a CRC value from the first 56-bits of the 64-bit ROM and compare it to the value stored within the DS18B20 to determine if the ROM data has been received error-free by the bus master. The equivalent polynomial function of this CRC is:The DS18B20 also generates an 8-bit CRC value using the same polynomial function shown above and provides this value to the bus master to validate the transfer of data bytes. In each case where a CRC is used for data transfer validation, the bus master must calculate a CRC value using the polynomial function given above and compare the calculated value to either the 8-bit CRC value stored in the 64-bit ROM portion of the DS18B20 (for ROM reads) or the 8-bit CRC value computed within the DS18B20(which is read as a ninth byte when the scratchpad is read). The comparison of CRC values and decision to continue with an operation are determined entirely by the bus master. There is no circuitry inside the DS18B20 that prevents a command sequence from proceeding if the CRC stored in or calculated by the DS18B20 does not match the value generated by the bus master.The 1-Wire CRC can be generated using a polynomial generator consisting of a shift register and XOR gates as shown in Figure 6. Additional information about the Dallas 1-Wire Cyclic Redundancy Check is available in Application Note 27 entitled “Understanding 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, 1 bit at a time is shifted in. After the 8th bit of the family code has been entered, then the serial number is entered. After the 48th bit of the serial number has been entered, the shift register contains the CRC value. Shifting in the 8 bits of CRC should return the shift register to all 0s. 中文翻译 DS1820 单总线数字温度计 DSl820数字温度计提供9位(二进制)温度读数指示器件的温度Information is sent to/from the DS18B20 over a 1-Wire interface, so that only one wire (and ground) needs to be connected from a central microprocessor to a DS18B20.。信息经过单线接口送入DSl820或从DSl820送出因此从主机CPU到DSl820仅需一条线(和地线)。 Power for reading, writing, and performing temperature conversions can be derived from the data line itself with no need for an external power source.写数据,读温度转换可以由数据线本身来提供电源而不需要一个外部电源。由于每个DS18B20的包含一个唯一的序列号,因此任意多个DSl820可以存放在同一条单线总线上。这允许在不同的地方放置温度传感器。此功能可应用的地方包括空调环境控制,建筑物内的温度感应,设备或机器的过程监控和控制。 The block diagram of Figure 1 shows the major components of the DS18B20.DS18B20的有四个主要的数据部分组成:1)64位激光ROM,2)温度灵敏元件,3)非易失性温度报警触发器TH和TL,4)配置寄存器。器件从单线的通信线上取得其电源,在信号线为高电平的时间周期内,把能量贮存在内部的电容器中,在单信号线为低电平的时间期内断开此电源,直到信号线变为高电平重新接上寄生电容电源为止。作为另一种可供选择的方法,DS1820 也可用外部5V 电源供电。与DS1820 的通信经过一个单线接口。在单线接口情况下,在ROM 操作未定建立之前不能使用存贮器和控制操作。主机必须首先提供五种ROM 操作命令之一:1)Read ROM(读ROM), 2)Match ROM(符合ROM),3)Search ROM(搜索ROM),4)Skip ROM(跳过ROM),或5) Alarm Search(告警搜索)。 这些命令对每一器件的64 位激光ROM 部分进行操作。如果在单线上有许多器件,那么可以挑选出一个特定的器件,并给总线上的主机指示存在多少器件及其类型。在成功地执行了ROM 操作序列之后,可使用存贮器和控制操作,然后主机可以提供六种存贮器和控制操作命令之一。一个控制操作命令指示DS1820 完成温度测量。该测量的结果将放入DS1820 的高速暂存存贮器(Scratchpad memory)。通过发出读暂存存储器内容的存储器操作命令可以读出此结果。每一温度告警触发器TH 和TL 构成一个字节的EEPROM, 如果不对DS1820 施加告警搜索命令,这些寄存器可用作通用用户存储器,使用存储器操作命令可以写TH 和TL。对这些寄存器的访问是通过高速暂存存储器,所有数据均以最低有效位在前的方式被读写PARASITE POWER。寄生电源电路当I/O或VDD引脚为高电平时,这个电路便“取”得电源。只要符合指定的定时和电压要求,I/O将提供足够的功率,寄生电源的优点是双重的:1)利用此引脚,远程温度检测无需本地电源,2)缺少正常电源条件下也可以读ROM。In order for the DS18B20 to be able to perform accurate temperature conversions, sufficient power must be provided over the DQ line when a temperature conversion is taking place.。为了使DS1820 能完成准确的温度变换,当温度变换发生时,I/O线上必须提供足够的功率。因为DS1820的工作电流高达1mA,5K 的上拉电阻将使I/O线没有足够的驱动能力。如果几个SD1820 在同一条I/O 线上而且企图同时变换,那么这一问题将变得特别尖锐。There are two ways to assure that the DS18B20 has sufficient supply current during its active conversion cycle.有两种方法确保DS1820在其有效变换期内得到足够的电源电流。The first is to provide a strong pullup on the DQ line whenever temperature conversions or copies to the E 2 memory are taking place.第一种方法是发生温度变换时在I/O线上提供一强的上拉电阻,This may be accomplished by using a MOSFET to pull the DQ line directly to the power supply as shown in Figur通过使用一个MOSFET把I/O线直接拉到电源可达到这一点,当使用寄生电源方式时VDD引脚必须连接到地。Another method of supplying current to the DS18B20 is through the use of an external power supply tied to the V DD pin, as shown in Figure 3.向DS1820 供电的另外一种方法是通过使用连接到VDD 引脚的外部电源,这种方法的优点是在I/O 线上不要求强的上拉电阻,总线上主机不需向上连接便在温度变换期间使线保持高电平,这就允许在变换时间内其它数据在单线上传送。此外,在单线总线上可以放置任何数目的DS1820 ,而且如果它们都使用外部电源,那么通过发出跳过(Skip)ROM 命令和接着发出变换(Convert)T 命令,可以同时完成温度变换。注意只要外部电源处于工作状态,GND(地)引脚不可悬空。 For situations where the bus master does not know whether the DS18B20s on the bus are parasite powered or supplied with external V DD , a provision is made in the DS18B20 to signal the power supply scheme used.在总线上主机不知道总线上DS1820 是寄生电源供电还是外部VDD 供电的情况下,在DS1820 内采取了措施来通知采用的供电方案。总线上主机通过发出跳过(Skip)ROM 的操作约定,然后发出读电源命令,可以决定是否有需要在DS1820 的总线上放置上拉电阻。在此命令发出后,主机接着发出读时间片。如果是寄生供电,DS1820 将在单线总线上送回(0);如果由VDD 引脚供电,它将送回(1)。如果主机接收到一个(0),它知道它必须在温度变换期间在I/O 线上供一个强的上拉。The DS18B20 has an 8-bit CRC stored in the most significant byte of the 64-bit ROM. The bus master can compute a CRC value from the first 56-bits of the 64-bit ROM and compare it to the

温馨提示

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

评论

0/150

提交评论