This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

interpreting data

hello
i have an array of 3 bytes unsgined char and i want to convert the 3 byte (hex) array to 1 byte (hex value).
values in the array are between 0 - 9 only.

unsigned char buf[3], output;
buf[0] = 0x01;
buf[0] = 0x02;
buf[0] = 0x03;


i want an output as follow:
123 in HEX => output = 0x7B

i tried 'sscanf' and i haven't succeeded.
please help.

0