Datasheet
DS18S20-PAR
9 of 20
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 DS18S20-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.
DS18S20-PAR FUNCTION COMMANDS
After the bus master has used a ROM command to address the DS18S20-PAR with which it wishes to
communicate, the master can issue one of the DS18S20-PAR function commands. These commands
allow the master to write to and read from the DS18S20-PAR’s scratchpad memory, initiate temperature
conversions and determine the power supply mode. The DS18S20-PAR function commands, which are
described below, are summarized in Table 4 and illustrated by the flowchart in Figure 10.
CONVERT T [44h]
This command initiates a single temperature conversion. Following the conversion, the resulting thermal
data is stored in the temperature register, COUNT REMAIN register and COUNT PER °C register in the
scratchpad memory, and the DS18S20-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 (t
conv
) as described in the PARASITE POWER section.
WRITE SCRATCHPAD [4Eh]
This command allows the master to write 2 bytes of data to the DS18S20-PAR’s scratchpad. The first
byte is written into the T
H
register (byte 2 of the scratchpad), and the second byte is written into the T
L
register (byte 3 of the scratchpad). Data must be transmitted least significant bit first. Both bytes MUST
be written before the master issues a reset, or the data may be corrupted.
READ SCRATCHPAD [BEh]
This command allows the master to read the contents of the scratchpad. The data transfer starts with the
least significant bit of byte 0 and continues through the scratchpad until the 9
th
byte (byte 8 – CRC) is
read. If only part of the scratchpad contents is required, the master may issue a reset to terminate reading
at any time.
COPY SCRATCHPAD [48h]
This command copies the contents of the scratchpad T
H
and T
L
registers (bytes 2 and 3) to EEPROM.
Within 10 ms (max) after this command is issued the master must enable a strong pullup on the 1-Wire
bus for at least 10 ms as described in the PARASITE POWER section.
RECALL E
2
[B8h]
This command recalls the alarm trigger values (T
H
and T
L
) from EEPROM and places the data in bytes 2
and 3, respectively, in the scratchpad memory. The master device can issue “read time slots” (see the 1-
WIRE BUS SYSTEM section) following the Recall E
2
command and the DS18S20-PAR will indicate the
status of the recall by transmitting 0 while the recall is in progress and 1 when the recall is done. The
recall operation happens automatically at power-up, so valid data is available in the scratchpad as soon as
power is applied to the device.