0% found this document useful (0 votes)
120 views

Interfacing Temperature Sensor

The document discusses interfacing a DS1620 temperature sensor with an AT89S51 microcontroller. The DS1620 is a digital thermometer and thermostat that provides 9-bit temperature readings and has three alarm outputs to act as a thermostat. It connects directly to the I/O port of the AT89S51 via a 3-wire interface of reset, clock, and data lines. The microcontroller can read temperature readings from the DS1620 and set high/low temperature thresholds to control heating and cooling devices using the thermostat outputs.

Uploaded by

Biswajit Sarkar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
120 views

Interfacing Temperature Sensor

The document discusses interfacing a DS1620 temperature sensor with an AT89S51 microcontroller. The DS1620 is a digital thermometer and thermostat that provides 9-bit temperature readings and has three alarm outputs to act as a thermostat. It connects directly to the I/O port of the AT89S51 via a 3-wire interface of reset, clock, and data lines. The microcontroller can read temperature readings from the DS1620 and set high/low temperature thresholds to control heating and cooling devices using the thermostat outputs.

Uploaded by

Biswajit Sarkar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Interfacing Temperature Sensor (DS1620) with AT89S51 Interfacing Temperature Sensor DS1620 with AT89S51

Overview Discussion
Introduction The DS1620 Digital Thermometer and Thermostat provides 9-bit temperature readings. It has three alarm outputs, so the device can also act as a thermostat. The DS1620, which incorporates a 3-wire interface can be controlled using an AT89C51 Microcontroller. The DS1620 is connected directly to the I/O port on the AT89C51 microcontroller, and the 3wire handshaking and temperature readings are handled by low-level software drivers as shown in this document. Temperature Control of the DS1620 The thermostat ouputs of the DS1620 allow it to directly control heating and cooling devices. THIGH is driven high if the device exceeds a predefined limit set within the TH Register. The output THIGH can be used to indicate that a high temperature tolerance boundary has been met or exceeded, or it can be used as part of a closed loop system to activate a cooling system and deactivate it when the system temperature returns to tolerance. TLOW is driven high when the temperature of the device falls below the limit set in the TL Register. TLOW remains active until the DS1620's temperature becomes greater than the value stored in the low temperature register, TL. TCOM is driven high when the temperature exceeds the limit set in the TH Register and remains high until the device temperature falls below that set in the TL Register. In this way, any amount of user-defined temperature hysteresis can be obtained. For typical thermostat operation, the DS1620 will operate in continuous mode. However, for applications here only one reading is needed at certain times or to conserve power, the one-shot mode may be used. Note that the thermostat outputs (THIGH , TLOW , TCOM) will remain in the state they were in after the last valid temperature conversion cycle when operating in one-shot mode. Hardware Configuration The 3-wire bus is comprised of three signals. These are the RST-bar (reset) signal, the CLK (clock) signal, and the DQ (data) signal. All data transfers are initiated by driving the RST-bar input high. Driving the RST-bar input low terminates the communication. A clock cycle is a sequence of a falling edge followed by a rising edge. For data inputs, the data must be valid during the rising edge of the clock cycle. Data bits are output on the falling edge of the clock and remain valid through the rising edge. When reading data from the DS1620, the DQ pin goes to a high-impedance state while the clock is high. Taking RST-bar low during a communication cycle will cause DQ to go to a highimpedance state, thus ending the communication. Data over the 3-wire interface is sent LSB first. Figure 1 illustrates the device connection to the microcontroller programmable

1.

input/output port.

You might also like