Instruction Manual

DS18S20
18 of 21
DS18S20 OPERATION EXAMPLE 3
In this example there is only one DS18S20 on the bus and it is using parasite power. The bus master
initiates a temperature conversion then reads the DS18S20 scratchpad and calculates a higher resolution
result using the data from the temperature, COUNT REMAIN and COUNT PER °C registers.
MASTER MODE DATA (LSB FIRST) COMMENTS
TX Reset Master issues reset pulse.
TR Presence DS18S20 responds with presence pulse.
TX CCh Master issues Skip ROM command.
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 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. The master also calculates the
TEMP_READ value and stores the contents of the COUNT
REMAIN and COUNT PER °C registers.
TX Reset Master issues reset pulse.
RX Presence DS18S20 responds with presence pulse.
- - CPU calculates extended resolution temperature using the
equation in the OPERATION - MEASURING
TEMPERATURE section of this datasheet.
RELATED APPLICATION NOTES
The following Application Notes can be applied to the DS18S20. These notes can be obtained from the
Dallas Semiconductor “Application Note Book,” via the Dallas website at http://www.dalsemi.com/, or
through our faxback service at (214) 450–0441.
Application Note 27: “Understanding and Using Cyclic Redundancy Checks with Dallas Semiconductor
Touch Memory Product”
Application Note 55: “Extending the Contact Range of Touch Memories”
Application Note 74: “Reading and Writing Touch Memories via Serial Interfaces”
Application Note 104: “Minimalist Temperature Control Demo”
Application Note 105: “High Resolution Temperature Measurement with Dallas Direct-to-Digital
Temperature Sensors”
Application Note 106: “Complex MicroLANs”
Application Note 108: “MicroLAN – In the Long Run”
Sample 1-wire subroutines that can be used in conjunction with AN74 can be downloaded from the
Dallas website or anonymous FTP Site.