[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-user: Brain cramp converting a hex value to decimal



Looking for some C help please.  Has anyone done this before?
 
I'm getting an integer value from a function that's in hex (0x004F).  I want to convert it to decimal (79), actually to each character of the decimal value or 7 and 9, so I can then look up on an lcd table to see what values correspond to each character.
 
I've tried multiple different ways and think this way may be the easiest.  I've converted the number to a character to get 0x4F.  Now I'd like to be able to pick off each character to convert it but I just can't seem to get them.  I'm to a point where I'm sending up a flare.  With the gurus on geda I was hoping someone might know.
 
I'm using Microchip's C30 compiler so it's ANSI C if that matters.
 
I'm going out know so I won't be able to check this post until later.
 
Thanks so much,
Rob

_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user