Here anolog value reads from channel 0 and it will display on the LCD
void main()
{
float i;
char a[13];
adcon1=0x80;
lcd_init(&portd);
lcd_cmd(lcd_cursor_off);
while(1)
{
i=adc_read(0)*.00488;
floattostr(i,a);
lcd_out(1,1,a);
lcd_out(1,5,” “);
delay_ms(500);
}
}