DS18S20-PAR
16 (10h). After reading the scratchpad, the TEMP_READ value is obtained by truncating the 0.5LC bit
(bit 0) from the temperature data (see Figure 3). The extended resolution temperature can then be
calculated using the following equation:
COUNT _ PER _C ꢀCOUNT _ REMAIN
TEMPERATURE ꢂ TEMP _ READ ꢀ 0.25ꢁ
COUNT _ PER _C
TEMPERATURE REGISTER FORMAT Figure 3
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
26
25
24
23
22
21
20
2-1
LS Byte
bit 15
bit 14
bit 13
bit 12
bit 11
bit 10
bit 9
bit 8
S
S
S
S
S
S
S
S
MS Byte
TEMPERATURE/DATA RELATIONSHIP Table 2
TEMPERATURE
DIGITAL OUTPUT
DIGITAL OUTPUT
(Binary)
(Hex)
+85.0°C*
+25.0°C
+0.5°C
0°C
0000 0000 1010 1010
0000 0000 0011 0010
0000 0000 0000 0001
0000 0000 0000 0000
1111 1111 1111 1111
1111 1111 1100 1110
1111 1111 1001 0010
00AAh
0032h
0001h
0000h
FFFFh
FFCEh
FF92h
-0.5°C
-25.0°C
-55.0°C
*The power-on reset value of the temperature register is +85°C
OPERATION – ALARM SIGNALING
After the DS18S20-PAR performs a temperature conversion, the temperature value is compared to the
user-defined two’s complement alarm trigger values stored in the 1-byte TH and TL registers (see Figure
4). The sign bit (S) indicates if the value is positive or negative: for positive numbers S = 0 and for
negative numbers S = 1. The TH and TL registers are nonvolatile (EEPROM) so they will retain data
when the device is powered down. TH and TL can be accessed through bytes 2 and 3 of the scratchpad as
explained in the MEMORY section of this datasheet.
TH AND TL REGISTER FORMAT Figure 4
bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
S
26
25
25
25
22
21
20
Only bits 8 through 1 of the temperature register are used in the TH and TL comparison since TH and TL
are 8-bit registers. If the result of a temperature measurement is higher than TH or lower than TL, an
alarm condition exists and an alarm flag is set inside the DS18S20-PAR. This flag is updated after every
temperature measurement; therefore, if the alarm condition goes away, the flag will be turned off after the
next temperature conversion.
The master device can check the alarm flag status of all DS DS18S20-PARs on the bus by issuing an
Alarm Search [ECh] command. Any DS18S20-PARs with a set alarm flag will respond to the command,
4 of 20