unsigned char Hex2Ascii(unsigned char HexValue)
{
   HexValue &= 0x0F;            // Mask-off the upper nibble

   if (HexValue <= 0x09)        // For values 0x00 - 0x09
   {
      return(HexValue + 0x30);  // Return the ascii code for the digits
   }
   else                         // For values 0x0A - 0x0F 
   {
      return(HexValue + 0x37);  // Return the upper case ascii codes
   }
}