View previous topic :: View next topic |
Author |
Message |
rhein
Joined: 03 Mar 2006 Posts: 4
|
Code to convert int variable to char |
Posted: Fri Aug 18, 2006 11:31 am |
|
|
Hi,
Anybody could help me please,
I need a library to convert a integer variable to char, im sending this to a LCD.
thanks for any help, |
|
|
rwyoung
Joined: 12 Nov 2003 Posts: 563 Location: Lawrence, KS USA
|
|
Posted: Fri Aug 18, 2006 12:06 pm |
|
|
sprintf springs to mind or roll your own, pretty simple to take apart an integer and convert each to ASCII equivalent.
Look up the modulus operator, think about it for a while and also look closely at an ASCII code chart.
This is a general question, so if you absolutely can't figure out how to use sprintf, repost your question in the general forum. _________________ Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month! |
|
|
rhein
Joined: 03 Mar 2006 Posts: 4
|
|
Posted: Fri Aug 18, 2006 2:07 pm |
|
|
i will look for information about sprintf function.
thanks for help |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
rhein
Joined: 03 Mar 2006 Posts: 4
|
|
Posted: Mon Aug 21, 2006 6:44 am |
|
|
it works and it is pretty simple.
Thanks for help. |
|
|
|