My question: How do I convert a 2 character hex value to single byte Binary values to put back onto an EEProm?
I want to read in "31" from my HEX SD file and write this 8 bit value (0011 0001) one location on my EEProm.
byte x1 = 0x33;byte x2 = 0x31;byte x = (x1 - 0x30 <<4) | (x2 - 0x30) //x = 31
Suppose you have the three values 01 AB 05, and they're written to the file as "1AB5". Is that supposed to be 1A B5, or 01 0A B5, or 1A 0B 05, or some other combination of values?
byte val = atoi(hexASCIIValue, 16);
The binary formatted 3-byte data (01 AB 05) will be written into SD card as ASCII codes which are: 30, 31, 41, 42, 30, 45 (all are in hex base).