
DS1821
062498 4/15
until reset by writing 0 into this location. This
feature provides a method of determining if
the DS1821 has ever been subjected to tem-
peratures above TH. This bit is nonvolatile,
and is stored in E
2
memory.
TLF =
Temperature Low Flag. This bit will normally
be “0”, but will be set to “1” when the tempera-
ture is lower than the value of TL. It will remain
“1” until reset by writing 0 into this location.
This feature provides a method of determin-
ing if the DS1821 has ever been subjected to
temperatures below TL. This bit is nonvola-
tile, and is stored in E
2
memory.
NVB=
Nonvolatile memory busy flag. “1” = Write to
an E
2
memory cell in progress, “0” = nonvola-
tile memory is not busy. A write to E
2
may
take up to 10 ms.
T/R* =
Power–up mode bit. If set to a “1”, the
DS1821 will power up in a thermostat mode.
If set to a “0”, the device will power up in
1–Wire “read” mode. This bit is nonvolatile.
POL =
Output Polarity Bit. “1” = active high, “0” =
active low. This bit is nonvolatile.
1SHOT= One Shot Mode. If 1SHOT is “1”, the DS1821
will perform one temperature conversion
upon reception of the Start Convert T proto-
col. If 1SHOT is “0”, the DS1821 will continu-
ously perform temperature conversions.
Note that the One Shot mode is available only
when the device is in 1–Wire mode. In ther-
mostat mode, the device continuously per-
forms temperature conversions. This bit is
nonvolatile.
PROGRAMMING COMMAND FUNCTIONS
The command set for the DS1821 as shown in Table 2 is
as follows:
Read Temperature [AAh]
This command reads the contents of the register which
contains the last temperature conversion result.
Write TH [01h]
This command writes to the TH (HIGH TEMPERA-
TURE) register. After issuing this command, the user
writes eight bits of data to the TH register.
Write TL [02h]
This command writes to the TL (LOW TEMPERATURE)
register. After issuing this command, the user writes
eight bits of data to the TL register.
Read TH [A1h]
This command reads the value of the TH (HIGH TEM-
PERATURE) register. After issuing this command, the
user reads the eight bits of data present in the TH
register.
Read TL [A2h]
This command reads the value of the TL (LOW TEM-
PERATURE) register. After issuing this command, the
user reads the eight bits of data present in the TL
register.
Write Status [0Ch]
This command writes to the status register. This would
be used for clearing the values of the THF and TLF
flags, and setting the T/R, POL and 1SHOT bits. After
issuing this command, the user writes the eight bit data
into the register.
Read Status [ACh]
This command reads the value in the status register.
After issuing this command, the user reads the eight bits
present in the status register.
Start Convert T [EEh]
This command begins a temperature conversion. No
further data is required. In One Shot mode, the tempera-
ture conversion will be performed and then the DS1821
will remain idle. In continuous mode, this command will
initiate continuous conversions.
Stop Convert T [22h]
This command stops temperature conversion. No fur-
ther data is required. This command may be used to halt
a DS1821 in continuous conversion mode. After issuing
this command, the current temperature measurement
will be completed, and then the DS1821 will remain idle
until a Start Convert T is issued to resume continuous
operation.