can somebody suggest/post a quick/small ascii to hex or dec to hex conversion routine. Make sure it works for a 3 digit.
I can convert from hex to dec like this:
dec1= hex1/16 + '0';
dec2= hex2/16 + '0';
Id be grateful if somebody suggests the opposite i.e dec to hex but workable algo for a 3 digit value tooo.
ZZX
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
Posted: Wed Apr 19, 2006 6:09 am
Look in the manual for:
atoi()
atol()
atoi32()
STRTOUL()
printf()
Guest
Posted: Thu Apr 20, 2006 5:44 am
Thank you for the hint.
Can you also specify if theres a function available for string to BCD conversion? Itll be a lot of help !
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
Posted: Thu Apr 20, 2006 10:27 pm
Search the board for BCD functions, You could also write one yourself.
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