Tiwana6330
Member level 1
Hi Everyone
I finally got my LCD working and now I can write anything to the LCD.
For next step, I am trying to put the value of ADC0 to LCD
I an able to get the ADC running and have verified it by putting the output to LED's on Port B. The LCD is connected on PORT D (data) and Port A (Control 1-3)
Now problem is that I am not able to tranfer ADC value to LCD. I think I am having some problem in Char to function tranfer. The code compiles fine, so I cannot debug it.
My MAIN code is
LCD Puts function is below
What am I doing wrong. Pl help. Thanks
I finally got my LCD working and now I can write anything to the LCD.
For next step, I am trying to put the value of ADC0 to LCD
I an able to get the ADC running and have verified it by putting the output to LED's on Port B. The LCD is connected on PORT D (data) and Port A (Control 1-3)
Now problem is that I am not able to tranfer ADC value to LCD. I think I am having some problem in Char to function tranfer. The code compiles fine, so I cannot debug it.
My MAIN code is
unsigned char val0;
while(1)
{
val0 = ReadAdcChannel(0);
lcd_goto(0); // select first line
lcd_puts(val0);
PORTB=val0;
}
LCD Puts function is below
void
lcd_puts(const char * s)
{
LCD_RS = 1; // write characters
while(*s)
lcd_write(*s++);
}
What am I doing wrong. Pl help. Thanks