Temperature Indicator Using AT89C52

Different temperature indicator project with discrete component is already published in Now, here is a microcontroller based temperature indicator with LCD for better and precise reading. A temperature sensor DS1621 is used here for better result. As we know that programming language “C” is less complicated with well-defined syntax in compare to Assembly language so we write program for microcontroller in “C”.

Circuit description

The circuit of temperature indicator is designed around microcontroller AT89C52 where DS1621 is used as temperature sensor. The block diagram of temperature indicator using AT89C52 is shown in figure 1.

block diagram of temperature indicator using at89c52

The temperature sensor IC3 is used to sense temperature and read as 9-bit value. The pin 1 and 2 of sensor (IC3) is connected to pin 11 and 10 respectively of microcontroller (IC2) as shown in circuit diagram. The sensor (IC3) activates its thermal alarm output in exceeding of user-defined high temperature until temperature drop below user-defined low temperature. Non-volatile memory is used to store user-defined temperature.

A crystal oscillator XTAL1 is connected to XTAL pin of microcontroller (i.e. pin 18 and 19) for operating of microcontroller. A high pulse on RST pin (pin 9) through capacitor C5 is given while the oscillator is running for reset the microcontroller. Pin 31 is also connected to +Ve supply for execution of internal program. During flash programming at 12V programming is selected pin 31 is also used to receive 12V programming enable voltage.

circuit diagram of temperature indicator using at89c52

The 16*1 LCD is used as display where VR1 is used to control the intensity of display. The connection of LCD is given in table 2 where pin 15 and 16 is not used.

Software:- A cross-complier C51 version 7.10 from keil software is used here for compiling the program code written in C.


Click Here To Download Program Code



DS1621 Command Set




Read Temperature

Reads last converted temperature value from temperature register.


Read Counter

Reads value of count remaining from counter.


Read Slope

Reads value of slope accumulator.


Start Convert T

Indicates temperature conversion.


Stop Convert T

Halts temperature conversion.


Access TH

Reads or writes low temperature limit value into TH register.


Access TL

Reads or writes low temperature limit value into TL register.


Access Configuration

Reads or writes configuration data to configuration register.




Pin Connection of the LCD

Pin No.


Pin 1

Ground (Gnd)

Pin 2


Pin 3

V0 (display intensity control)

Pin 4

RS (connected to pin P3.2 of AT89C52)

Pin 5

R/W (connected to pin P3.3 of AT89C52)

Pin 6

EN (connected to pin P3.4 of AT89C52)

Pin 7

D0 (connected to pin P1.0 of AT89C52)

Pin 8

D1 (connected to pin P1.1 of AT89C52)

Pin 9

D2 (connected to pin P1.1 of AT89C52)

Pin 10

D3 (connected to pin P1.3 of AT89C52)

Pin 11

D4 (connected to pin P1.4 of AT89C52)

Pin 12

D5 (connected to pin P1.5 of AT89C52)

Pin 13

D6 (connected to pin P1.6 of AT89C52)

Pin 14

D7 (connected to pin P31.7 of AT89C52)

Pin 15

Backlight +Vcc (not used)

Pin 16

Backlight Gnd (not used)

pcb layout temperature indicator using AT89c52 3


Resistors (all ¼-watt, ± 5% Carbon)

R1 = 1 KΩ

R2 = 47 KΩ

R3 = 10 KΩ

R4, R5 = 4.7 KΩ

VR1 = 1 KΩ (Preset)


C1 = 470 µF/25V (Electrolytic)

C2 – C4 = 0.1 µF (Ceramic)

C5 = 10 µF/16V (Electrolytic)

C6, C7 = 33 pF (Ceramic)


IC1 = LM7805 (Voltage Regulator)

IC2 = AT89C52 (Microcontroller)

IC3 = DS1621 (Temperature Sensor)

D1 – D4 = 1N4007 (Rectifier Diode)


12 thoughts on “Temperature Indicator Using AT89C52”

  1. Hi, I am working on this project currently and I couldn’t find a 16×1 LCD. So got a 16×2 LCD display. Is there any workaround to get this project working using the 16×2 LCD ?

    Much Thanks in advance!

  2. Thank you so much. I am a student and did find this information quite useful. However, i would like to have a more detailed explanation of this project topic but do not know which website to find it from.
    Also how do I factor in the phrase”..for three process” in the design and construction of a microcontroller based temperature indicator for three process. What does it even mean first of all?

  3. That microcontroller is get the development kit but the burning software is not available

  4. That microcontroller is outdated. Its development kiy is available but the software for the development kit is not available for that particular microcontroller

Leave a Reply

Your email address will not be published. Required fields are marked *