Discussion in "AVR Discussion Forum" started by    rahuljin    Jul 23, 2008.
Mon Aug 04 2008, 09:08 pm
#21
Thank you PID33 it looks great
Tue Aug 05 2008, 11:41 am
#22
thanks. i will try to use it.
Tue Aug 05 2008, 05:27 pm
#23
one more problem ---

how to print numbers ( i.e. 1,2,3,4,5,6,....) without using customized character codes or like characters with single quates ( 'H' ) ?
i want like this ---

datawr(1);

this should print 1 on lcd.
Tue Aug 05 2008, 09:08 pm
#24
hi rahul,
if u want to display an integer value u have to convert it to ASCII equivalent before sending it to the LCD..u can do that by simply adding 30 to the basic value because value of 0 in ASCII is 48 (decimal), for 1 it is 49.... and so on.
if ur value is in say variable x then u can just write
datawr(x+48) ;
but be careful to check that the value of x does not exceed 9 or the LCD might display some unwanted characters.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

FrankTrelm
Tue May 14 2024, 10:39 am
BillyTum
Tue May 14 2024, 09:08 am
Loganbag
Tue May 14 2024, 04:05 am
MichaelMog
Tue May 14 2024, 03:58 am
ThomasGaxaW
Mon May 13 2024, 05:33 pm
RobertInfup
Mon May 13 2024, 04:28 pm
Joshuatem
Mon May 13 2024, 08:30 am
RaymondPex
Mon May 13 2024, 03:24 am