|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 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" $crystal=1000000 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 Do Cls C =getadc(0) C =c/2 Lcd"temp is"; C Waitms 500 Loop End