
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
   }


   // Now, convert the low nibble
   if (HexValue <= 0x09)        // For values 0x00 - 0x09
   {
      return(HexValue + '0');   // Return the ascii code for the digits
   }
   else                         // For values 0x0A - 0x0F 
   {
      return((HexValue-10) + 'A');   // Return the upper case ascii codes
   }
}