lcd_putc is used to display a character in LCD. I wish to display a decimal number. Can anyone pls advice me what will be the command to display a number in LCD?
Thanks
Aryan
Leo
Joined: 22 Feb 2005 Posts: 5
Posted: Thu Feb 24, 2005 7:52 am
Have a look at the printf statement, e.g.
Code:
float x = 1.2345;
printf( lcd_putc, "This is a decimal number: %1.2f \n", x);
Leo
[/code]
JEliecer
Joined: 08 Feb 2005 Posts: 17 Location: Bucaramanga - Colombia
JELIECER
Posted: Fri Apr 22, 2005 8:03 pm
Code:
x=25;
lcd_putc(x);
With this lines you can place a number in the LCD.
or
printf(lcd_putc,"\f %d", x);
See the PIC C reference manual for number formats. _________________ Jorge Eliécer Castro
"THE UNIVERSE FOREVER CONSPIRES SO THAT OUR DESIRES ARE WILL BE REALITY"
"EL UNIVERSO SIEMPRE CONSPIRA PARA QUE NUESTROS DESEOS SE HAGAN REALIDAD"
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum