English
Language : 

DS18B20_07 Datasheet, PDF (18/21 Pages) Dallas Semiconductor – Programmable Resolution 1-Wire Digital Thermometer
DS18B20
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 MODE
TX
RX
TX
TX
TX
TX
TX
RX
TX
TX
TX
RX
DATA (LSB FIRST)
Reset
Presence
55h
64-bit ROM code
44h
DQ line held high by
strong pullup
Reset
Presence
55h
64-bit ROM code
BEh
9 data bytes
COMMENTS
Master issues reset pulse.
DS18B20s respond with presence pulse.
Master issues Match ROM command.
Master sends DS18B20 ROM code.
Master issues Convert T command.
Master applies strong pullup to DQ for the duration of the
conversion (tconv).
Master issues reset pulse.
DS18B20s respond with presence pulse.
Master issues Match ROM command.
Master sends DS18B20 ROM code.
Master issues Read Scratchpad command.
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 TH, TL, 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 MODE
TX
RX
TX
TX
TX
TX
RX
TX
TX
RX
TX
RX
TX
TX
TX
DATA (LSB FIRST)
Reset
Presence
CCh
4Eh
3 data bytes
Reset
Presence
CCh
BEh
9 data bytes
Reset
Presence
CCh
48h
DQ line held high by
strong pullup
COMMENTS
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 (TH, TL, and config).
Master issues reset pulse.
DS18B20 responds with presence pulse.
Master issues Skip ROM command.
Master issues Read Scratchpad command.
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.
Master issues reset pulse.
DS18B20 responds with presence pulse.
Master issues Skip ROM command.
Master issues Copy Scratchpad command.
Master applies strong pullup to DQ for at least 10ms while copy
operation is in progress.
18 of 21