BCD to HEX conversion
Discussion in "8051 Discussion Forum" started by madhuprasanna Dec 5, 2007.
Wed Dec 05 2007, 01:29 pm
hi everybody,
iam confusing in bcd to hex or ascii conversions.
actual problem is i want to display bcd output on 16X2 lcd display.
i have tried by say write(v+0x30);,but some garbage value is displayed.can anyone help me out .it's urgent.:)
thankx in advance..
[email protected]
iam confusing in bcd to hex or ascii conversions.
actual problem is i want to display bcd output on 16X2 lcd display.
i have tried by say write(v+0x30);,but some garbage value is displayed.can anyone help me out .it's urgent.:)
thankx in advance..
[email protected]
Wed Dec 05 2007, 03:44 pm
V should be of range (0 to 9) if you want to use write(v+0x30)
other wise if its a 2 digit number then first you need to separate them and then use write (v+0x30)
other wise if its a 2 digit number then first you need to separate them and then use write (v+0x30)
Powered by e107 Forum System