Grag38 ... Ummm... What happens with A-F with that code?
This function will convert a character representation of a hexidecimal digit into the actual hexidecimal value:
unsigned char h2d(unsigned char hex)
{
if(hex > 0x39) hex -= 7; // adjust for hex letters upper or lower case
return(hex & 0xf);
}
Use that to create your pairs of numbers, and use a 4-bit left shift to combine them:
unsigned char high_nibble,low_nibble,value;
high_hibble = h2d(incoming[0]);
low_nibble = h2d(incoming[1]);
value = (high_nibble << 4) | low_nibble;
Do that for each pair in a loop, and you're good to go.