dallas semiconductor DS1821 service manual

ma
r
(
)
(
)
G
www.maxim-ic.com
DS1821
Programmable Digital Thermostat and
Thermomete
FEATURES
Requires no external components Unique 1-Wire
Operates over a -55°C to +125°C (-67°F to
+257°F) temperature range
Functions as a standalone thermostat with
user-definable trip-points
Provides 8-bit (1°C resolution) centigrade
temperature measurements
Accuracy is ±1°C over 0°C to +85°C range Converts temperature to a digital word in 1
second (max)
Available in 3-pin PR35 and 8-pin SO
packages
Applications include thermostatic controls,
industrial systems, consumer products, thermometers, or any thermally sensitive system
®
interface requires only one
PIN ASSIGNMENT
DALLAS
DS1821
2 3
1
DD
DQ
V
GND
1
2 3
BOTTOM VIEW
PR35
(DS1821)
DQ ND
NC NC
1
DS1821S
2
3
4
8-pin 208-mil SO
DS1821S
V
DD
7
NC
6
NC
5
NC
PIN DESCRIPTION
GND - Ground DQ - Data In/Out and Thermostat Output VDD - Power Supply Voltage NC - No Connect
DESCRIPTION
The DS1821 can function as a standalone thermostat with user-programmable trip-points or as 8-bit temperature sensor with a 1-Wire digital interface. The thermostat trip-points are stored in nonvolatile memory, so DS1821 units can be programmed prior to system insertion for true standalone operation. The DS1821 has an operating temperature range of –55°C to +125°C and is accurate to ±1°C over a range of 0°C to +85°C. Communication with the DS1821 is accomplished through the open-drain DQ pin; this pin also serves as the thermostat output.
1-Wire is a registered trademark of Dallas Semiconducto r Corp ., a wholly owned subsidiary of Maxim Integrated Products, Inc.
1 of 18 071107
DS1821
ORDER INFORMATION
ORDERING NUMBER
DS1821 DS1821 DS1821 in 3-pin PR35 DS1821+ DS1821 (See Note) DS1821 in 3-pin PR35 DS1821S DS1821S DS1821 in 208 mil 8-pin SO DS1821S/T&R DS1821S DS1821 in 208 mil 8-pin SO, 2000 Piece Tape-and-Reel DS1821S+ DS1821S (See Note) DS1821 in 208 mil 8-pin SO DS1821S+T&R DS1821S (See Note) DS1821 in 208 mil 8-pin SO, 2000 Piece Tape-and-Reel
Note: A “+” symbol will also be marked on the package. + Denotes lead-free package.
PACKAGE MARKING
DESCRIPTION
DETAILED PIN DESCRIPTIONS Table 1
PR35 8-PIN
SO*
SYMBOL DESCRIPTION
1 2 GND
Ground pin.
2 1 DQ Open drain data input/output pin – 1-Wire operation; Open drain
thermostat output pin –thermostat operation.
3 8 VDD
Power supply pin.
*All pins not specified in this table are “No Connect” pins.
OVERVIEW
Figure 1 shows a block diagram of the DS1821 and pin descriptions are given in Table 1. The DS1821 can operate as a standalone thermostat with user-programmable trip-points or as 8-bit temperature sensor with a 1-Wire digital interface. The open-drain DQ pin functions as the thermostat output for thermostat operation and as the data I/O pin for 1-Wire communications. The 1-Wire interface provides user access to the nonvolatile (EEPROM) thermostat trip-point registers (TH and TL), the status/configuration register, and the temperature register.
When configured as standalone thermostat, temperature conversions start immediately at power-up. In this mode, the DQ pin becomes active when the temperature of the DS1821 exceeds the limit programmed into the T programmed into the T
The DS1821 uses Dallas’ exclusive 1-Wire bus protocol that implements bus communication with one control signal. This system is explained in detail in the 1-Wire BUS SYSTEM section of this datasheet.
register, and remains active until the temperature drops below the limit
H
register.
L
2 of 18
DS1821
GIS
A
V
DS1821 BLOCK DIAGRAM Figure 1
VDD
DS1821
CONFIGURATION REGISTER
ND CONTROL LOGIC
4.7K
DQ
DD
GND
POWER
SUPPLY
SENSE
1-WIRE
INTERFACE
AND
I/O CONTROL
TEMPERATURE SENSOR
TH REGISTER
TL RE
TER
DIGITAL
COMPARATOR/
LOGIC
TEMPERATURE SENSOR FUNCTIONALITY
The core functionality of the DS1821 is its proprietary direct-to-digital temperature sensor, which
provides 8-bit (1°C increment) centigrade temperature readings over the range of -55°C to +125°C.
A block diagram of the temperature measurement circuitry is shown in Figure 2. This circuit measures the temperature by counting the number of clock cycles generated by an oscillator with a low temperature coefficient (temp-co) during a gate period determined by a high temp-co oscillator. The low temp-co counter is preset with a base count that corresponds to –55°C. If the counter reaches 0 before the gate period is over, the temperature register, which is preset to –55°C, is incremented by one degree, and the counter is again preset with a starting value determined by the slope accumulator circuitry. The preset counter value is unique for every temperature increment and compensates for the parabolic behavior of the oscillators over temperature.
At this time, the counter is clocked again until it reaches 0. If the gate period is not over when the counter reaches 0, the temperature register is incremented again. This process of presetting the counter, counting down to zero, and incrementing the temperature register is repeated until the counter takes less time to reach zero than the duration of the gate period of the high temp-co oscillator. When this iterative process is complete, the value in the temperature register will indicate the centigrade temperature of the device.
3 of 18
DS1821
TEMPERATURE MEASURING CIRCUITRY Figure 2
SLOPE ACCUMULATOR
PRESET COMPARE
LOW TEMPERATURE
COEFFICIENT OSCILLATOR
COUNTER PRESET
SET/CLEAR LSB
=0
INC
TEMPERATURE REGISTER
HIGH TEMPERATURE
COEFFICIENT OSCILLATOR
COUNTER
=0
STOP
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 (TH and TL) 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 TH and TL 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.
4 of 18
DS1821
Nonvolatile write status can be monitored by reading the NVB bit in the status/configuration register: NVB = 1 – a write to EEPROM memory is in progress, NVB = 0 – nonvolatile memory is idle.
THERMOSTAT MODE
In thermostat mode (T/R¯ = 1), the DS1821 can operate as a standalone thermostat that triggers according
to the TH and TL trip-points programmed while the device was in 1-Wire mode. In thermostat mode the DS1821 powers-up performing continuous temperature conversions, and the DQ pin acts as the thermostat output. Detailed operation of the thermostat output is provided in the OPERATION – STANDALONE THERMOSTAT section of this datasheet.
Communications can be re-established with the DS1821 while it is in thermostat mode by pulling VDD to 0V while the DQ line is held high, and then toggling the DQ line low 16 times as shown in Figure 12. This temporarily places the DS1821 in 1-Wire mode, allowing microprocessor communication with the DS1821 via the DQ pin. At this time any I/O function can be performed, such as reading/writing the T T
or configuration registers or reading the temperature register. To return to thermostat mode, the same
L
procedure can be performed (pulling V
to 0V while the DQ line is held high, and then clocking the DQ
DD
,
H
line 16 times) or the power can be cycled. Note that temporarily putting the DS1821 into 1-Wire mode does not change the power-up mode of the device; this can only be changed by rewriting the T/R¯ bit in the status/configuration register. Also note that holding both V
and DQ low for more than
DD
approximately 10 seconds will cause the DS1821 to be powered down.
OPERATION – MEASURING TEMPERATURE
DS1821 output temperature data is calibrated in degrees centigrade and is stored in two’s complement format in the 1-byte (8-bit) temperature register (see Figure 3), which the user can access when the
DS1821 is in 1-Wire mode (T/R¯ = 0 in the status/configuration register). The sign bit (S) indicates if the
temperature is positive or negative; for positive numbers S = 0 and for negative numbers S = 1. Table 2 gives examples of digital output data and the corresponding temperature reading. For Fahrenheit measurements, a lookup table or conversion routine must be used.
The DS1821 can be configured by the user to take continuous temperature measurements (continuous conversion mode) or single measurements (one-shot mode). The desired configuration can be achieved by setting the nonvolatile1SHOT bit in the status/configuration register: 1SHOT = 0 – continuous conversion mode, 1SHOT = 1 – one-shot mode. Note that the 1SHOT setting only controls the operation of the device in 1-Wire mode; in thermostat mode, continuous temperature conversions are started automatically at power-up.
In continuous conversion mode, the Start Convert T [EEh] command initiates continuous temperature conversions, which can be stopped using the Stop Convert T [22h] command. In one-shot mode the Start Convert T [EEh] command initiates a single temperature conversion after which the DS1821 returns to a low-power standby state. In this mode, the microprocessor can monitor the DONE bit in the configuration register to determine when the conversion is complete: DONE = 0 ― conversion in progress, DONE = 1 conversion complete. The DONE bit does not provide conversion status in continuous conversion mode since measurements are constantly in progress (i.e., DONE will always be
0).
TEMPERATURE, TH and T
REGISTER FORMAT Figure 3
L
bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0
S 26 2
5
2
4
2
5 of 18
3
2
2
2
1
2
0
TEMPERATURE/DATA RELATIONSHIP Table 2
DS1821
TEMPERATURE
+125°C* 0111 1101 7Dh
+85°C 0101 0101 55h +25°C 0001 1001 19h
0°C 0000 0000 00h
-1°C 1111 1111 FFh
-25°C 1110 0111 E7h
-55°C 1100 1001 C9h
DIGITAL OUTPUT
(Binary)
DIGITAL OUTPUT
(Hex)
HIGH-RESOLUTION TEMPERATURE READINGS
The user can calculate temperature values with higher than 8-bit resolution using the data remaining in the counter and slope accumulator when the temperature conversion is complete. To do this the user must first read the temperature from the 8-bit temperature register. This value is called TEMP_READ in the high-resolution equation (see Eq. 1). The 9-bit counter value must then be obtained by issuing the Read Counter [A0h] command. This value is the count remaining in the counter at the end of the gate period and is called COUNT_REMAIN in Eq. 1. Next the Load Counter [41h] command must be issued, which loads the 9-bit slope accumulator value into the counter register. The slope accumulator value (called COUNT_PER_C in Eq. 1) can then be read from the counter by again issuing the Read Counter [A0h] command. The slope accumulator value is called “COUNT_PER_C” because it represents the number of counts needed for an accurate measurement at a given temperature (i.e., the counts per degree C). The high-resolution temperature can then be calculated using Eq. 1:
Eq. 1) TEMPERATURE = TEMP_READ − 0.5 +
High-resolution temperature readings cannot be used while in continuous conversion mode. Also, the Read Counter [A0h] and Load Counter [41h] commands must not be used while in continuous conversion mode.
REMAINCOUNTCPERCOUNT
CPERCOUNT
__
)___(
6 of 18
Loading...
+ 12 hidden pages