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

How can I print an Integer value using lcd_putc() function.

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



Joined: 07 Mar 2012
Posts: 34
Location: jalpaiguri, India

View user's profile Send private message

How can I print an Integer value using lcd_putc() function.
PostPosted: Mon Feb 10, 2014 9:42 am     Reply with quote

Hi,

I am using "lcd.c" driver to print a Integer value on LCD (LHD162A)
Please tell how can I do that using lcd_putc() function.

please help !! Sad
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

Re: How can I print an Integer value using lcd_putc() functi
PostPosted: Mon Feb 10, 2014 10:45 am     Reply with quote

SubhamayS wrote:
Hi,

I am using "lcd.c" driver to print a Integer value on LCD (LHD162A)
Please tell how can I do that using lcd_putc() function.




First, read the PIC manual. it specifically states that printf can call other functions. It's very frustrating to have posters crying for help when they simply haven't read the manual. This does nothing but raise the static level drowning out more significant issues/problems others are having.

Your question is outlined right on the help page covering printf.

In your case,

Code:

printf(lcd_putc, "some string with numbers like %u\r\n", someInt8);

_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
SubhamayS



Joined: 07 Mar 2012
Posts: 34
Location: jalpaiguri, India

View user's profile Send private message

Problem solved ! :)
PostPosted: Tue Feb 11, 2014 8:14 am     Reply with quote

Thank a lot @bkamen .. Smile
EJAZMIRZAN



Joined: 02 Aug 2013
Posts: 3

View user's profile Send private message

PostPosted: Tue Feb 25, 2014 7:09 pm     Reply with quote

itoa function in string.h convert integer to equivalent character. then you can print it.
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