DS18B20
18 of 22
DS18B20 OPERATION EXAMPLE 1
In this example there are multiple DS18B20s on the bus and they are using parasite power. The bus
master initiates a temperature conversion in a specific DS18B20 and then reads its scratchpad and
recalculates the CRC to verify the data.
Master issues reset pulse.
DS18B20s respond with presence pulse.
Master issues Match ROM command.
Master sends DS18B20 ROM code.
Master issues Convert T command.
Tx
strong pullup
Master applies strong pullup to DQ for the duration of the
conversion (t
CONV
).
Master issues reset pulse.
DS18B20s respond with presence pulse.
Master issues Match ROM command.
Master sends DS18B20 ROM code.
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.
DS18B20 OPERATION EXAMPLE 2
In this example there is only one DS18B20 on the bus and it is using parasite power. The master writes to
the T
H
, T
L
, and configuration registers in the DS18B20 scratchpad and then reads the scratchpad and
recalculates the CRC to verify the data. The master then copies the scratchpad contents to EEPROM.
Master issues reset pulse.
DS18B20 responds with presence pulse.
Master issues Skip ROM command.
Master issues Write Scratchpad command.
Master sends three data bytes to scratchpad (T
H
L
Master issues reset pulse.
DS18B20 responds with presence pulse.
Master issues Skip ROM command.
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
Master issues reset pulse.
DS18B20 responds with presence pulse.
Master issues Skip ROM command.
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.