??? 05/08/08 16:32 Read: times |
#154584 - small trick is cool..... Responding to: ???'s previous message |
Russ, what is that doing? It does work using Andy's code with a simple return of your value....is the HexValue a passed array member that is compared?
Here is that function block in application and tested: unsigned char Hex2Ascii(unsigned char HexValue) { // First, ensure that the value to be converted is in the low nibble if( HexValue > 0x0F ) { HexValue >>= 4; // Shift the value down from the top nibble } return "0123456789ABCDEF"[HexValue]; } |