Datasheet

64-Bit Lasered ROM Code
Each DS18S20 contains a unique 64-bit code (see
Figure 8) stored in ROM. The least significant 8 bits of the
ROM code contain the DS18S20’s 1-Wire family code:
10h. The next 48 bits contain a unique serial number.
The most significant 8 bits contain a cyclic redundancy
check (CRC) byte that is calculated from the first 56 bits
of the ROM code. A detailed explanation of the CRC bits
is provided in the CRC Generation section. The 64-bit
ROM code and associated ROM function control logic
allow the DS18S20 to operate as a 1-Wire device using
the protocol detailed in the 1-Wire Bus System section.
Memory
The DS18S20’s memory is organized as shown in
Figure 9. The memory consists of an SRAM scratch-
pad with nonvolatile EEPROM storage for the high and
low alarm trigger registers (T
H
and T
L
). Note that if the
DS18S20 alarm function is not used, the T
H
and T
L
reg-
isters can serve as general-purpose memory. All mem-
ory commands are described in detail in the DS18S20
Function Commands section.
Byte 0 and byte 1 of the scratchpad contain the LSB and
the MSB of the temperature register, respectively. These
bytes are read-only. Bytes 2 and 3 provide access to T
H
and T
L
registers. Bytes 4 and 5 are reserved for internal
use by the device and cannot be overwritten; these bytes
will return all 1s when read. Bytes 6 and 7 contain the
COUNT REMAIN and COUNT PER ºC registers, which
can be used to calculate extended resolution results as
explained in the Operation—Measuring Temperature
section.
Byte 8 of the scratchpad is read-only and contains the
CRC code for bytes 0 through 7 of the scratchpad.
The DS18S20 generates this CRC using the method
described in the CRC Generation section.
Data is written to bytes 2 and 3 of the scratchpad using
the Write Scratchpad [4Eh] command; the data must be
transmitted to the DS18S20 starting with the least signifi-
cant bit of byte 2. To verify data integrity, the scratchpad
can be read (using the Read Scratchpad [BEh] command)
after the data is written. When reading the scratchpad,
data is transferred over the 1-Wire bus starting with the
least significant bit of byte 0. To transfer the T
H
and T
L
data from the scratchpad to EEPROM, the master must
issue the Copy Scratchpad [48h] command.
Figure 8. 64-Bit Lasered ROM Code
Figure 9. DS18S20 Memory Map
8-BIT CRC 48-BIT SERIAL NUMBER 8-BIT FAMILY CODE (10h)
MSB LSB MSB LSB MSB LSB
BYTE 0
BYTE 1
TEMPERATURE LSB (AAh)
TEMPERATURE MSB (00h)
(85°C)
BYTE 2
BYTE 3
T
H
REGISTER OR USER BYTE 1*
T
L
REGISTER OR USER BYTE 2*
BYTE 4
BYTE 5
RESERVED (FFh)
RESERVED (FFh)
BYTE 6
BYTE 7
COUNT REMAIN (0Ch)
COUNT PER °C (10h)
BYTE 8
CRC*
*POWER-UP STATE DEPENDS ON VALUE(S) STORED IN EEPROM.
T
H
REGISTER OR USER BYTE 1
T
L
REGISTER OR USER BYTE 2
SCRATCHPAD
(POWER-UP STATE)
EEPROM
DS18S20 High-Precision 1-Wire Digital Thermometer
www.maximintegrated.com
Maxim Integrated
8