You are on page 1of 1

Code: #include <avr/io.h> #include lcd_lib.h #include <util/delay.h> #include adc_lib.h #include<stdio.

h> void main ( ) { int x; char a[15]; LCDinit(); LCDclr( ); ADCinit(10); while (1) { x = read_adc(0); to pin 0 of port A // returns the digital value of the analog i/p connected

// Initializes ADC in 10 bit mode

sprintf(a, "Value = %d ",x); LCDclr (); LCDstring (a, 10); _delay_ms (300); } }

You might also like