Datasheet
DS18S20-PAR
4 of 20
16 (10h). After reading the scratchpad, the TEMP_READ value is obtained by truncating the 0.5°C bit
(bit 0) from the temperature data (see Figure 3). The extended resolution temperature can then be
calculated using the following equation:
CPERCOUNT
REMAINCOUNTCPERCOUNT
READTEMPETEMPERATUR
__
___
25.0_
-
+-=
TEMPERATURE REGISTER FORMAT Figure 3
bit 7
bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0
LS Byte
2
6
2
5
2
4
2
3
2
2
2
1
2
0
2
-1
bit 15 bit 14 bit 13 bit 12 bit 11 bit 10 bit 9 bit 8
MS Byte
SSSSSSSS
TEMPERATURE/DATA RELATIONSHIP Table 2
TEMPERATURE DIGITAL OUTPUT
(Binary)
DIGITAL OUTPUT
(Hex)
+85.0°C* 0000 0000 1010 1010 00AAh
+25.0°C 0000 0000 0011 0010 0032h
+0.5°C 0000 0000 0000 0001 0001h
0°C 0000 0000 0000 0000 0000h
-0.5°C 1111 1111 1111 1111 FFFFh
-25.0°C 1111 1111 1100 1110 FFCEh
-55.0°C 1111 1111 1001 0010 FF92h
*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 T
H
and T
L
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 T
H
and T
L
registers are nonvolatile (EEPROM) so they will retain data
when the device is powered down. T
H
and T
L
can be accessed through bytes 2 and 3 of the scratchpad as
explained in the MEMORY section of this datasheet.
T
H
AND T
L
REGISTER FORMAT Figure 4
bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0
S2
6
2
5
2
5
2
5
2
2
2
1
2
0
Only bits 8 through 1 of the temperature register are used in the T
H
and T
L
comparison since T
H
and T
L
are 8-bit registers. If the result of a temperature measurement is higher than T
H
or lower than T
L
, 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,