PDA

View Full Version : int to string conversion



guanerrr
- 22nd December 2005, 10:22
How to convert from int to string. I wanna to display number in LCD because LCD accept on string. TQ

Dwayne
- 22nd December 2005, 17:06
One way is th "Dig" command, you can isolate each digit of your number, and output it to your LCD.

Dwayne

HenrikOlsson
- 23rd December 2005, 06:34
Hi,
If I underastand your question correct what you need is the # operator.

LCDOUT $FE, 1, #YourVariable

If YourVariable holds the value 106 this command will print 106 on the LCD instead of the ASCII representation of 106 which is "j". This will also work with Serout, Serout2, Hserout & Debug.

/Henrik Olsson.

guanerrr
- 24th December 2005, 02:00
Thanks HenrikOlsson, your reply is very helpful.