DS18B20-PAR
9 of 19
cycle (i.e., Search ROM command followed by data exchange) as many times as necessary to identify all
of the slave devices. If there is only one slave on the bus, the simpler Read ROM command (see below)
can be used in place of the Search ROM process. For a detailed explanation of the Search ROM
procedure, refer to the iButton® Book of Standards at www.ibutton.com/ibuttons/standard.pdf. After
every Search ROM cycle, the bus master must return to Step 1 (Initialization) in the transaction sequence.
READ ROM [33h]
This command can only be used when there is one slave on the bus. It allows the bus master to read the
slave’s 64-bit ROM code without using the Search ROM procedure. If this command is used when there
is more than one slave present on the bus, a data collision will occur when all the slaves attempt to
respond at the same time.
MATCH ROM [55h]
The match ROM command followed by a 64–bit ROM code sequence allows the bus master to address a
specific slave device on a multi-drop or single-drop bus. Only the slave that exactly matches the 64–bit
ROM code sequence will respond to the function command issued by the master; all other slaves on the
bus will wait for a reset pulse.
SKIP ROM [CCh]
The master can use this command to address all devices on the bus simultaneously without sending out
any ROM code information. For example, the master can make all DS18B20-PARs on the bus perform
simultaneous temperature conversions by issuing a Skip ROM command followed by a Convert T [44h]
command. Note, however, that the Skip ROM command can only be followed by the Read Scratchpad
[BEh] command when there is one slave on the bus. This sequence saves time by allowing the master to
read from the device without sending its 64–bit ROM code. This sequence will cause a data collision on
the bus if there is more than one slave since multiple devices will attempt to transmit data simultaneously.
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 DS18B20-PARs experienced an alarm condition during the most recent temperature conversion.
After every Alarm Search cycle (i.e., Alarm Search command followed by data exchange), the bus master
must return to Step 1 (Initialization) in the transaction sequence. Refer to the OPERATION – ALARM
SIGNALING section for an explanation of alarm flag operation.
DS18B20-PAR FUNCTION COMMANDS
After the bus master has used a ROM command to address the DS18B20-PAR with which it wishes to
communicate, the master can issue one of the DS18B20-PAR function commands. These commands
allow the master to write to and read from the DS18B20-PAR’s scratchpad memory, initiate temperature
conversions and determine the power supply mode. The DS18B20-PAR function commands, which are
described below, are summarized in Table 4 and illustrated by the flowchart in Figure 11.
CONVERT T [44h]
This command initiates a single temperature conversion. Following the conversion, the resulting thermal
data is stored in the 2-byte temperature register in the scratchpad memory and the DS18B20-PAR returns
to its low-power idle state. Within 10 ms (max) after this command is issued the master must enable a
strong pullup on the 1-Wire bus for the duration of the conversion (tconv) as described in the PARASITE
POWER section.
WRITE SCRATCHPAD [4Eh]
This command allows the master to write 3 bytes of data to the DS18B20-PAR’s scratchpad. The first
data byte is written into the TH register (byte 2 of the scratchpad), the second byte is written into the TL
register (byte 3), and the third byte is written into the configuration register (byte 4). Data must be
iButton is a registered trademark of Dallas Semiconductor.