![Dallas DS1821 Manual Download Page 4](http://html1.mh-extra.com/html/dallas/ds1821/ds1821_manual_3301561004.webp)
DS1821
4 of 18
TEMPERATURE MEASURING CIRCUITRY
Figure 2
OPERATING MODES
The DS1821 has two operating modes: 1-Wire mode and thermostat mode. The power-up operating
mode is determined by the user-programmable T/R
¯
bit in the status/configuration register: if T/R
¯
= 0 the
device powers-up in 1-Wire mode, and if T/R
¯
= 1 the device powers-up in thermostat mode. The T/R
¯
bit
is stored in nonvolatile memory (EEPROM), so it will retain its value when the device is powered down.
1-Wire MODE
The DS1821 arrives from the factory in 1-Wire mode (T/R
¯
= 0). In this mode, the DQ pin of the DS1821
is configured as a 1-Wire port for communication with a microprocessor using the protocols described in
the 1-Wire BUS SYSTEM section of this datasheet. These communications can include reading and
writing the high and low thermostat trip-point registers (T
H
and T
L
) and the configuration register, and
reading the temperature, counter, and slope accumulator registers. Also in this mode, the microprocessor
can initiate and stop temperature measurements as described in the OPERATION – MEASURING
TEMPERATURE section of this datasheet.
The T
H
and T
L
registers and certain bits (THF, TLF, T/R
¯
, POL and 1SHOT) in the status/configuration
register are stored in nonvolatile EEPROM memory, so they will retain data when the device is powered
down. This allows these registers to be pre-programmed when the DS1821 is to be used as a standalone
thermostat. Writes to these nonvolatile registers can take up to 10ms. To avoid data corruption, no
writes to nonvolatile memory should be initiated while a write to nonvolatile memory is in progress.
SLOPE ACCUMULATOR
PRESET
COMPARE
LOW TEMPERATURE
COEFFICIENT OSCILLATOR
COUNTER
PRESET
=0
TEMPERATURE REGISTER
HIGH TEMPERATURE
COEFFICIENT OSCILLATOR
COUNTER
=0
INC
STOP
SET/CLEAR
LSB