Data Sheet
DS18B20
23 of 27
MEMORY FUNCTION EXAMPLE Table 6
Example: Bus Master writes memory (parasite power and only one DS18B20 assumed).
MASTER MODE DATA (LSB FIRST) COMMENTS
TX Reset Reset pulse.
RX Presence Presence pulse.
TX CCh Skip ROM command.
TX 4Eh Write Scratchpad command.
TX <3 data bytes> Writes three bytes to scratchpad (TH, TL, and config).
TX Reset Reset pulse.
RX Presence Presence pulse.
TX CCh Skip ROM command.
TX BEh Read Scratchpad command.
RX <9 data bytes> Read entire scratchpad plus CRC. The master now
recalculates the CRC of the eight data bytes received
from the scratchpad, compares the CRC and the two
other bytes read back from the scratchpad. If data match,
the master continues; if not, repeat the sequence.
TX Reset Reset pulse.
RX Presence Presence pulse.
TX CCh Skip ROM command.
TX 48h Copy Scratchpad command; after issuing this command,
the master must wait 10 ms for copy operation to
complete.
TX Reset Reset pulse.
RX Presence Presence pulse, done.