CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Display a decimal number in LCD

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
aryan_kb



Joined: 24 Jan 2005
Posts: 1

View user's profile Send private message Send e-mail

Display a decimal number in LCD
PostPosted: Wed Feb 23, 2005 11:42 am     Reply with quote

Hi,

I am a beginner in this field.

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

View user's profile Send private message

PostPosted: Thu Feb 24, 2005 7:52 am     Reply with quote

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

View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger

JELIECER
PostPosted: Fri Apr 22, 2005 8:03 pm     Reply with quote

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"
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group