
DS18S20
11 of 23
SKIP ROM [CCh]
The master can use this co mmand to address all devices on the bus simultaneously without sending out
any ROM code information. For example, the master can make all DS18S20s on the bus perform
simultaneous temperature convers io ns by issuing a Skip ROM co mmand fo llowed by a Convert T [44h]
command.
Note that the Read Scratchpad [BEh] command can follow the Skip ROM command only if there is a
single slave device on the bus. In this case, time is saved by allowing the master to read from the slave
without sending the device’s 64-bit ROM code. A Skip ROM command followed by a Read Scratchpad
command wil l ca us e a data coll ision on the bus i f there is mor e th an one slave sin ce multiple devices wi ll
attempt to transmit data simultan eously.
ALARM SEARCH [ECh]
The operation of this command is identical to the operation of the Search ROM command except that
only slaves with a set alarm flag will respond. This command allows the master device to determine if
any DS18S20s experienced an alarm condition during the most recent temperature conversion. After
every A lar m S earc h c ycle ( i. e., Alar m Search co mmand fo llo wed by d at a exc ha nge), t he bus ma st er must
return to Step 1 (Init ialization) in the transaction sequence. See the Operation—Alarm Signaling section
for an e xpla natio n o f alar m flag op er ation.
DS18S20 FUNCTION COMMANDS
After the bus master has used a ROM command to address the DS18S20 with which it wishes to
communicate, t he mast er can issue o ne o f t he DS18S20 funct ion co mma nd s. These co mmands allow the
mast er to write to and read from the DS18S 20 ’ s s cratchpad memory, initiat e te mperat ur e convers io ns and
determine the power supply mode. The DS18S20 function commands, which are described below, are
su mma r iz ed in Table 2 and il lustr ated b y the flowchart in Figure 15.
CONVERT T [44h]
This co mmand init iates a single temperature convers io n. Follo w ing t he c onvers io n, t he resu lt ing t he r ma l
dat a is st or ed in t he 2-byt e t emperat ur e register in t he scratchpad memo r y and t he DS18S20 r et urns to it s
low-power idle state. If the device is being used in parasite power mode, within 10µs (max) after this
command is issued the master must enable a strong pullup on the 1-Wire bus for the duration of the
co nvers io n (t CONV) as descr ibed in the Powe ring the DS18S20 section. I f the DS18S20 is powered by an
ext erna l su pp ly, t he ma ster can issue read-time slot s aft er t he Co nvert T co mma nd a nd the DS18S 20 wi ll
respond by transmitt ing 0 while the temperature conversion is in progress and 1 when t he conversio n is
done. In parasite power mode this notification technique cannot be used since the bus is pulled high by
t he st ro ng pullup dur ing the conversion.
WRITE SCRATCHPAD [4Eh]
This command allows the master to write 2 bytes of data to the DS18S20’s scratchpad. The first byte is
wr itt en int o t he T H reg ist er (byte 2 o f the scrat chpad), and t he second byte is writt en into t he T L register
(byte 3 of the scratchpad). Data must be transmitted least significant bit first. Both bytes MUST be
written be fore the mast er issues a r eset, or the data may be cor r u pt ed.
READ SCRAT CHPAD [BEh]
This co mmand allo ws t he ma ster to read t he contents of the scratchpad. The data transfer starts w it h t he
least significant bit of byte 0 and continues through the scratchpad until the 9th byte (byte 8 – CRC) is
read. The master may issue a reset t o ter minate reading at any t ime if only part of the scrat chpad d at a is
needed.