【正文】
n the device is powered down. The DS18B20 uses Dallas’ exclusive 1Wire bus protocol that implements bus munication using one control signal. The control line requires a weak pull up resistor since all devices are linked to the bus via a 3state or opendrain 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 device’s unique 64bit code. Because each device has a unique code, the number of devices that can be addressed on one bus is virtually unlimited Another feature of the DS18B20 is the ability to operate without an external power supply. Power is instead supplied through the 1Wire pull up resistor via the DQ pin when the bus is high. The high bus signal also charges an internal capacitor (C ), which then supplies power to the device when the bus is PP low. This method of deriving power from the 1Wire 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 the DS18B20 is its directtodigital temperature sensor. The resolution of the temperature sensor is userconfigurable to 9, 10, 11, or 12 bits, corresponding to increments of C, C, C, and C, respectively. The default resolution at powerup is 12bit. The DS18B20 powersup in a lowpower idle state。 to initiate a temperature measurement and AtoD conversion, the master must issue a Convert T [44h] mand. Following the conversion, the resulting thermal data is stored in the 2