![Dallas DS1820 Скачать руководство пользователя страница 23](http://html1.mh-extra.com/html/dallas/ds1820/ds1820_instruction_3300589023.webp)
DS1820
021497 23/27
MEMORY FUNCTION EXAMPLE Table 5
Example: Temperature conversion and interpolation (external power supply and only one DS1820 assumed).
MASTER MODE
DATA (LSB FIRST)
COMMENTS
TX
Reset
Reset pulse.
TR
Presence
Presence pulse.
TX
CCh
Skip ROM command.
TX
44h
Convert T command.
RX
<1 data byte>
Read busy flag eight times. The master continues reading
one byte (or bit) after another until the data is FFh (all
bits 1).
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 recal-
culates the CRC of the eight data bytes received from the
scratchpad and compares both CRCs. If the CRCs match,
the data is valid. The master saves the temperature value
and stores the contents of the count register and count
per
°
C register as COUNT_REMAIN and COUNT_PER_C,
respectively.
TX
Reset
Reset pulse.
RX
Presence
Presence pulse, done.
–
–
CPU calculates temperature as described in the data sheet
for higher resolution.