Digital Thermometer using AVR, LM35 and 16×2 LCD

Digital Thermometer using Atmega16

Thermometers are the device we use to measure the temperature in any desired scale and we all will be quite familiar with the analog thermometers. There are some disadvantages in analog thermometers and this can be overcome by using this digital thermometer using avr. The above embedded system shows the design and implementation of a simple Digital Thermometer using Atmega16 (AVR),  LM35 & 16×2 LCD.


LM35 Pin diagram

LM35 is a Precision temperature sensor IC with its output proportional to the temperature (in degree Celsius). LM35 is capable of giving accurate temperature readings compared to thermistor. The senor is sealed to avoid the effects of oxidation and other factors. It operates at a temperature range of -55°c to 150°c. The output voltage varies by 10mV in response to every °C rise or fall in atmospheric temperature.

16×2 LCD:

16×2 LCD Pin Diagram

LCD (Liquid Crystal Display) is widely used electronic display module and got a wide range of applications. A 16×2 LCD consists of 16 columns and 2 rows thereby it is capable of displaying 16 characters in a single line. It consists of two registers, Command register used to store the command instructions given to the LCD. Whereas Data Register used to store the data’s to be displayed in the LCD. Read more about Interfacing 16×2 LCD with Atmega16.


This system was coded using Bascom Software for AVR using “Basic Language”.

$regfile ="m16def.dat"
Config lcd = 16*2
Config lcdpin =pin ,rs=portb.2,e= portb.3,db4= portb.4 , db5=portb.5, db6=portb.6, db7=portb.7
Config adc =single ,prescaler =auto , reference =Avcc
Start adc
Dim c as integer
C =getadc(0)
C =c/2
Lcd"temp is"; C
Waitms 500

Digital Thermometer
Digital Thermometer
Digital Thermometer.rar
9.1 KB
The following two tabs change content below.
Frank Donald

Frank Donald

Junior Network Engineer at Tata Communications
Frank Donald is an Electronics and Communication Engineer who loves building stuff in his free time. Video games, blogging and programming are the things he loves most

Ask your query

Be the First to Comment!

Notify of