Operation-measuring temperature, Temperature/data relationships table 2, Operation-thermostat control – Rainbow Electronics DS1721 User Manual

Page 4

Advertising
background image

DS1721

4 of 16

OPERATION-Measuring Temperature

The core of DS1721 functionality is its direct-to-digital temperature sensor. The DS1721 measures
temperature through the use of an on-chip temperature measurement technique with an operation range
from -55°C to +125°C. The device can be configured to perform continuous conversions with the most
recent result being stored in the thermometer register. The device can also be configured to perform a
single conversion, store the result, and return to a standby mode. Regardless of the mode used, the digital
temperature is retrieved from the temperature register using the Read Temperature (AAh) command, as
described in detail in the “Command Set” section. The DS1721 power-up default has the sensor set to
automatically perform 12-bit conversions continuously once the Start Convert T (51h) command is
issued. Details on how to change the settings after power-up are contained in the “OPERATION-
Programming” section.

The resolution of the temperature conversion can be configured as 9, 10, 11, or 12 bits, with 12-bit
readings as the default state. This equates to a temperature resolution of 0.5°C, 0.25°C, 0.125°C, or
0.0625°C. Following each conversion thermal data is stored in the thermometer register in two’s
complement format; the information can be retrieved over the 2-wire interface by issuing a Read
Temperature (AAh) command. Table 2 describes the exact relationship of output data to measured
temperature. The table assumes the DS1721 is configured for 12-bit resolution; if the device is configured
in a lower resolution mode, insignificant bits will contain zeros. The data is transmitted serially over the
2-wire serial interface, MSb first. The MSb of the temperature register contains the “sign” (S) bit,
denoting whether the temperature is positive or negative. For Fahrenheit usage, a lookup table or
conversion routine must be used.

TEMPERATURE/DATA RELATIONSHIPS Table 2

S

2

6

2

5

2

4

2

3

2

2

2

1

2

0

MSB

MSb

(UNIT = °C)

LSb

2

-1

2

-2

2

-3

2

-4

0

0

0

0

LSB

TEMP

DIGITAL OUTPUT

(Binary)

DIGITAL OUTPUT

(Hex)

+125°C

0111 1101 0000 0000

7D00h

+25.0625°C

0001 1001 0001 0000

1910h

+10.125°C

0000 1010 0010 0000

0A20h

+0.5°C

0000 0000 1000 0000

0080h

+0°C

0000 0000 0000 0000

0000h

-0.5°C

1111 1111 1000 0000

FF80h

-10.125°C

1111 0101 1110 0000

F5E0h

-25.0625°C

1110 0110 1111 0000

E6F0h

-55°C

1100 1001 0000 0000

C900h

OPERATION-Thermostat Control

In its operating mode, the DS1721 functions as a thermostat with programmable hysteresis, as shown in
Figure 2. The thermostat output updates as soon as a temperature conversion is complete. When the
DS1721’s temperature meets or exceeds the value stored in the high temperature trip register (TH), the
output becomes active, and will stay active until the temperature is equal to or below the temperature
stored in the low temperature trigger register (TL). In this way, any amount of hysteresis may be
obtained.

Advertising