Temperature, t, And t, Register format figure 3 – Rainbow Electronics DS1821 User Manual
Page 5: Temperature/data relationship table 2, High-resolution temperature readings

DS1821
Page 5 of 17
configuration register to determine when the conversion status: DONE = 0 ― conversion in progress,
DONE = 1 ― conversion complete. The DONE bit does not provide conversion status in continuous
conversion mode since measurements are constantly in progress (i.e., DONE will always be 0).
TEMPERATURE, T
H
and T
L
REGISTER FORMAT Figure 3
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
S
2
6
2
5
2
4
2
3
2
2
2
1
2
0
TEMPERATURE/DATA RELATIONSHIP Table 2
TEMPERATURE
DIGITAL OUTPUT
(Binary)
DIGITAL OUTPUT
(Hex)
+125°C*
0111 1101
7Dh
+85°C
0101 0101
55h
+25°C
0001 1001
19h
0°C
0000 0000
00h
-1°C
1111 1111
FFh
-25°C
1110 0111
E7h
-55°C
1100 1001
C9h
HIGH-RESOLUTION TEMPERATURE READINGS
The user can calculate temperature values with higher than 8-bit resolution using the data remaining in
the counter and slope accumulator when the temperature conversion is complete. To do this the user must
first read the temperature from the 8-bit temperature register. This value is called TEMP_READ in the
high-resolution equation (see Eq. 1). The 9-bit counter value must then be obtained by issuing the Read
Counter [A0h] command. This value is the count remaining in the counter at the end of the gate period
and is called COUNT_REMAIN in Eq. 1. Next the Load Counter [41h] command must be issued, which
loads the 9-bit slope accumulator value into the counter register. The slope accumulator value (called
COUNT_PER_C in Eq. 1) can then be read from the counter by again issuing the Read Counter [A0h]
command. The slope accumulator value is called “COUNT_PER_C” because it represents the number of
counts needed for an accurate measurement at a given temperature (i.e., the counts per degree C). The
high-resolution temperature can then be calculated using Eq. 1:
Eq. 1)
TEMPERATURE = TEMP_READ
−
0.5
+
C
PER
COUNT
REMAIN
COUNT
C
PER
COUNT
_
_
)
_
_
_
(
−
Additional information about high-resolution temperature calculations can be found in Application Note
105: “High Resolution Temperature Measurement with Dallas Direct-to-Digital Temperature Sensors”.