View previous topic :: View next topic |
Author |
Message |
uludere72
Joined: 15 Feb 2006 Posts: 2
|
LCD Display Help!! |
Posted: Wed Feb 15, 2006 9:44 am |
|
|
I am new for Pic CCS!
I want to see integer, float long number on LCD display how can i see ?
exp:
first line .. Volt : 48.09 V Rms
second Line .. Amp: 1.19 Amp
thanks |
|
|
rberek
Joined: 10 Jan 2005 Posts: 207 Location: Ottawa, Canada
|
|
Posted: Wed Feb 15, 2006 11:41 am |
|
|
Searching this forum will reveal several examples of formatting output to an LCD. aThere is also a good description of the printf() command in the manual, or there are examples in the PICC>Examples directory on your computer. _________________ The difference between genius and stupidity is that genius has its limits... |
|
|
kel
Joined: 17 Oct 2005 Posts: 68 Location: Brisbane
|
try this! |
Posted: Wed Feb 15, 2006 7:27 pm |
|
|
this is how it's done to print any of the one you mentioned.
//lcd_goxy()
Code: | printf(LCD_PUTC,"%d %u %f %Lu\n",int,unsinged int, float,uinsigned long); |
this has been discussed here as well..
http://www.ccsinfo.com/forum/viewtopic.php?t=25762 |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Wed Feb 15, 2006 11:06 pm |
|
|
Quote: | this is how it's done to print any of the one you mentioned.
//lcd_goxy()
Code:
printf(LCD_PUTC,"%d %u %f %Lu\n",int,unsinged int, float,uinsigned long); |
Did you notice that you misspelled the word "unsigned" in two different
ways ? That's not helpful to newbies. I don't want to be mean, but I
think you should wait until you're an intermediate level programmer
before you post answers. |
|
|
kel
Joined: 17 Oct 2005 Posts: 68 Location: Brisbane
|
sorry typing error!! |
Posted: Thu Feb 16, 2006 1:54 am |
|
|
Sorry that was a typing error.I hope he didn't get confused !
Code: | printf(LCD_PUTC,"%d %u %f %Lu\n",int,unsigned int, float,unsigned long); |
|
|
|
uludere72
Joined: 15 Feb 2006 Posts: 2
|
|
Posted: Thu Feb 16, 2006 3:09 am |
|
|
thnks for your help ..
I got what i want to do !!
step by step i started :-) PicC |
|
|
sonicdeejay
Joined: 20 Dec 2005 Posts: 112
|
|
Posted: Thu Feb 16, 2006 3:28 am |
|
|
this is my LCD function....
Code: | void display(float disfricfact)
{
// Display Friction Percentage in
lcd_gotoxy(4,1);
printf(lcd_putc, "Resistance");
//delay_ms(500);
lcd_gotoxy(2,2);
printf(lcd_putc, "%4.2f Percent",disfricfact);
//delay_ms(500);
}
|
|
|
|
|