DS18S20
16 of 23
Figure 14. ROM Commands Flowchart
CCh
SKIP ROM
COMMAND
MASTER T
X
RESET PULSE
DS18S20 T
X
PRESENCE
PULSE
MASTER T
X
ROM
COMMAND
33h
READ ROM
COMMAND
55h
MATCH ROM
COMMAND
F0h
SEARCH ROM
COMMAND
ECh
ALARM SEARCH
COMMAND
MASTER T
X
BIT 0
DS18S20 T
X
BIT 0
DS18S20 T
X
BIT 0
MASTER T
X
BIT 0
BIT 0
MATCH?
MASTER T
X
BIT 1
BIT 1
MATCH?
BIT 63
MATCH?
MASTER T
X
BIT 63
N
Y
Y Y Y
Y
N
N
N
N
N
N
N
Y
Y
Y
DS18S20 T
X
BIT 1
DS18S20 T
X
BIT 1
MASTER T
X
BIT 1
DS18S20 T
X
BIT 63
DS18S20 T
X
BIT 63
MASTER T
X
BIT 63
BIT 0
MATCH?
BIT 1
MATCH?
BIT 63
MATCH?
N
N
N
Y
Y
Y
DS18S20 T
X
FAMILY CODE
1 BYTE
DS18S20 T
X
SERIAL NUMBER
6 BYTES
DS18S20 T
X
CRC BYTE
DS18S20 T
X
BIT 0
DS18S20 T
X
BIT 0
MASTER T
X
BIT 0
N
Y
DEVICE(S)
WITH ALARM
FLAG SET?
Initialization
Sequence
MASTER T
X
FUNCTION
COMMAND
(FIGURE 15)
DS18S20
17 of 23
Figure 15. DS18S20 Function Commands Flowchart
MASTER T
X
FUNCTION
COMMAND
Y
N
44h
CONVERT
TEMPERATURE
?
PARASITE
POWER
?
N
Y
DS18S20 BEGINS
CONVERSION
DEVICE
CONVERTING
TEMPERATURE
?
N
Y
MASTER
R
X
“0s
MASTER
R
X
“1s
MASTER ENABLES
STRONG PULLUP ON DQ
DS18S20 CONVERTS
TEMPERATURE
MASTER DISABLES
STRONG PULLUP
Y
N
48h
COPY
SCRATCHPAD
?
PARASITE
POWER
?
N
Y
MASTER ENABLES
STRONG PULL-
UP ON DQ
DATA COPIED FROM
SCRATCHPAD TO EEPROM
MASTER DISABLES
STRONG PULLUP
MASTER
R
X
“0s
COPY IN
PROGRESS
?
Y
MASTER
R
X
“1s
N
RETURN TO INITIALIZATION
SEQUENCE (FIGURE 14) FOR
NEXT TRANSACTION
B4h
READ
POWER SUPPLY
?
Y
N
PARASITE
POWERED
?
N
MASTER
R
X
“1s
MASTER
R
X
“0s
Y
MASTER T
X
T
H
BYTE
TO SCRATCHPAD
Y
N
4Eh
WRITE
SCRATCHPAD
?
MASTER T
X
T
L
BYTE
TO SCRATCHPAD
Y
N
Y
BEh
READ
SCRATCHPAD
?
HAVE 8 BYTES
BEEN READ
?
N
MASTER
T
X
RESET
?
MASTER R
X
DATA BYTE
FROM SCRATCHPAD
N
Y
MASTER R
X
SCRATCHPAD
CRC BYTE
MASTER
R
X
“1s
Y
N
B8h
RECALL E
2
?
MASTER BEGINS DATA
RECALL FROM E
2
PROM
DEVICE
BUSY RECALLING
DATA
?
N
Y
MASTER
R
X
“0s
DS18S20
18 of 23
DS18S20 OPERATION EXAMPLE 1
In this example there are multiple DS18S20s on the bus and they are using parasite power. The bus
master initiates a temperature conversion in a specific DS18S20 and then reads its scratchpad and
recalculates the CRC to verify the data.
MASTER MODE
DATA (LSB FIRST)
COMMENTS
Tx
Reset
Master issues reset pulse.
Rx
Presence
DS18S20s respond with presence pulse.
Tx
55h
Master issues Match ROM command.
Tx
64-bit ROM code
Master sends DS18S20 ROM code.
Tx
44h
Master issues Convert T command.
Tx
DQ line held high by
strong pullup
Master applies strong pullup to DQ for the duration of the
conversion (t
CONV
).
Tx
Reset
Master issues reset pulse.
Rx
Presence
DS18S20s respond with presence pulse.
Tx
55h
Master issues Match ROM command.
Tx
64-bit ROM code
Master sends DS18S20 ROM code.
Tx
BEh
Master issues Read Scratchpad command.
Rx 9 data bytes
Master reads entire scratchpad including CRC. The master
then recalculates the CRC of the first eight data bytes from the
scratchpad and compares the calculated CRC with the read
CRC (byte 9). If they match, the master continues; if not, the
read operation is repeated.
DS18S20 OPERATION EXAMPLE 2
In this example there is only one DS18S20 on the bus and it is using parasite power. The master writes to
the T
H
and T
L
registers in the DS18S20 scratchpad and then reads the scratchpad and recalculates the
CRC to verify the data. The master then copies the scratchpad contents to EEPROM.
MASTER MODE
DATA (LSB FIRST)
COMMENTS
Tx
Reset
Master issues reset pulse.
Rx
Presence
DS18S20 responds with presence pulse.
Tx
CCh
Master issues Skip ROM command.
Tx
4Eh
Master issues Write Scratchpad command.
Tx
2 data bytes
Master sends two data bytes to scratchpad (T
H
and T
L
)
Tx
Reset
Master issues reset pulse.
Rx
Presence
DS18S20 responds with presence pulse.
Tx
CCh
Master issues Skip ROM command.
Tx
BEh
Master issues Read Scratchpad command.
Rx 9 data bytes
Master reads entire scratchpad including CRC. The master
then recalculates the CRC of the first eight data bytes from
the scratchpad and compares the calculated CRC with the
read CRC (byte 9). If they match, the master continues; if not,
the read operation is repeated.
Tx
Reset
Master issues reset pulse.
Rx
Presence
DS18S20 responds with presence pulse.
Tx
CCh
Master issues Skip ROM command.
Tx
48h
Master issues Copy Scratchpad command.
Tx
DQ line held high by
strong pullup
Master applies strong pullup to DQ for at least 10ms while
copy operation is in progress.

DS18S20Z

Mfr. #:
Manufacturer:
Maxim Integrated
Description:
Board Mount Temperature Sensors 1-Wire Parasite-Power Digital Thermometer
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet