《数字温度计外文翻译》由会员分享,可在线阅读,更多相关《数字温度计外文翻译(8页珍藏版)》请在毕设资料网上搜索。
1、附录二 外文资料翻译 资料原文 DS18B20 Programmable Resolution 1- Wire Digital Thermometer DESCRIPTION The DS18B20 Digital Thermometer provides 9 to 12 bit centigrade temperature measurements and has an alarm function with nonvolatile user-programmable upper and lower trigger points. The DS18B20 communicates over
2、a 1-Wire bus that by definition requires only one data line (and ground) for communication with a central microprocessor. It has an operating temperature range of 55 to +125 C and is accurate to 0.5 over the range of 10 to +85 . In addition, the DS18B20 can derive power directly from the data line (
3、“ parasite power” ), eliminating the need for an external power supply. Each DS18B20 has a unique 64-bit serial code, which allows multiple DS18B20s to function on the same 1 wire bus; thus, it is simple to use one microprocessor to control many DS18B20s distributed over a large area. Applications t
4、hat can benefit from this feature include HVAC environmental controls,temperature monitoring systems inside buildings, equipment ormachinery, and process monitoring and control systems. OVERVIEW Figure 1 shows a block diagram of the DS18B20, and pin descriptions are given in Table 1. The 64-bit ROM
5、stores the device s unique serial code. The scratchpad memory contains the 2-byte temperature register that stores the digital output from the temperature sensor. In addition, the scratchpad provides access to the 1-byte upper and lower alarm trigger registers (TH and TL), and the 1-byte configurati
6、on 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 TH, TL and configuration registers are nonvolatile (EEPROM), so they will retain data when the device is powered down. The DS18B20 uses Dallas exclusiv
7、e 1-Wire bus protocol that implements bus communication using one control signal. The control line requires a weak pullup resistor since all devices are 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 devi
8、ce) identifies and addresses devices on the bus using each device s unique 64-bit code. Because each device has a unique code, the number of devices that can be addressed on one bus is virtually unlimited. The 1-Wire bus protocol, including detailed explanations of the commands and“ time slots,” is
9、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. Power 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 capaci
10、tor (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 power.” As an alternative, the DS18B20 may also be powered by an external supply on VDD. OPERATION MEASURING TEMPERATURE The core functionality of th
11、e DS18B20 is its direct-to-digital temperature sensor. The resolution of the temperature sensor is user-configurable to 9, 10, 11, or 12 bits, corresponding to increments of 0.5 , 0.25 , 0.125 , and 0.0625 , respectively. The default resolution at power-up is 12-bit. The DS18B20 powers-up in a low-p
12、ower idle state; to initiate a temperature measurement and A-to-D conversion, the master must issue a Convert T 44h command. Following the conversion, 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 DS
13、18B20 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 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
14、 with parasite power, this notification technique cannot be used since the bus must be pulled high by a strong pullup during the entire temperature conversion. The bus requirements for parasite power are explained in detail in the POWERING THE DS18B20 section of this datasheet. POWERING THE DS18B20
15、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 very space constraine
16、d. 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 provide power when the
17、 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 (refer to the DC EL
18、ECTRICAL 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 an unacceptable vol
19、tage 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 being copied from the
20、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 10 s(max) after a Convert T 44h or Copy Scratchpad 48h command is issued, and the bus must be held high by the pullu
21、p 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 Figure 5. The adva
22、ntage 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 +100 since the DS18B20 may not be able to sustain communications due to the hi
23、gher 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 are parasite powered
24、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 “ read time slot” . D
25、uring 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. MEMORY The DS18B20 s memory is o
26、rganized 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 used, the TH and TL registers can serve as general-purpose memo
27、ry. 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 provide access to TH and TL registers. Byte 4 contains the con
28、figuration 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 read. Byte 8 of the scratchpad is read-only and contains the cy
29、clic 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 Scratchpad 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 bus starting with the least