Datasheet
Overview
Figure 3 shows a block diagram of the DS18S20, and
pin descriptions are given in the Pin Description table.
The 64-bit ROM stores the device’s unique serial code.
The scratchpad memory contains the 2-byte temperature
register that stores the digital output from the temperature
sensor. In addition, the scratchpad provides access to the
1-byte upper and lower alarm trigger registers (T
H
and
T
L
). The T
H
and T
L
registers are nonvolatile (EEPROM),
so they will retain data when the device is powered down.
The DS18S20 uses Maxim’s exclusive 1-Wire bus proto-
col that implements bus communication using one control
signal. The control line requires a weak pullup resistor
since all devices are linked to the bus via a 3-state or
open-drain port (the DQ pin in the case of the DS18S20).
In this bus system, the microprocessor (the master
device) identifies and addresses devices on the bus
using each device’s unique 64-bit code. Because each
device has a unique code, the number of devices that
can be addressed on one bus is virtually unlimited. The
1-Wire bus protocol, including detailed explanations of the
commands and “time slots,” is covered in the 1-Wire Bus
System section.
Another feature of the DS18S20 is the ability to operate
without an external power supply. Power is instead sup-
plied through the 1-Wire pullup resistor via the DQ pin
when the bus is high. The high bus signal also charges an
internal capacitor (C
PP
), which then supplies power to the
device when the bus is low. This method of deriving power
from the 1-Wire bus is referred to as “parasite power.” As
an alternative, the DS18S20 may also be powered by an
external supply on V
DD
.
Operation—Measuring Temperature
The core functionality of the DS18S20 is its direct-to-dig-
ital temperature sensor. The temperature sensor output
has 9-bit resolution, which corresponds to 0.5°C steps.
The DS18S20 powers-up in a low-power idle state; to
initiate a temperature measurement and A-to-D conver-
sion, the master must issue a Convert T [44h] command.
Following the conversion, the resulting thermal data is
stored in the 2-byte temperature register in the scratch-
pad memory and the DS18S20 returns to its idle state.
If the DS18S20 is powered by an external supply, the
master can issue “read-time slots” (see the 1-Wire Bus
System section) after the Convert T command and the
DS18S20 will respond by transmitting 0 while the tem-
perature conversion is in progress and 1 when the con-
version is done. If the DS18S20 is powered with parasite
power, this notification technique cannot be used since
the bus must be pulled high by a strong pullup during the
entire temperature conversion. The bus requirements for
parasite power are explained in detail in the Powering The
DS18S20 section.
Figure 3. DS18S20 Block Diagram
V
PU
64-BIT ROM
AND
1-Wire PORT
DQ
V
DD
INTERNAL V
DD
C
PP
PARASITE POWER CIRCUIT
MEMORY
CONTROL LOGIC
SCRATCHPAD
8-BIT CRC
GENERATOR
TEMPERATURE
SENSOR
ALARM HIGH TRIGGER (T
H
)
REGISTER (EEPROM)
ALARM LOW TRIGGER (T
L
)
REGISTER (EEPROM)
GND
DS18S
20
4.7kΩ
POWER-
SUPPLY SENSE
DS18S20 High-Precision 1-Wire Digital Thermometer
www.maximintegrated.com
Maxim Integrated
│
5