Make hex to ascii
George Krietsepis
Posts: 284
Dear All,
could you please help me on the below issue ?
I have a hexadecimal array Buffer[] = $00,$00,$00,$00,$00,$05,$00,$03,$02,$12,$34
What I need to do is to get the two last hex's, buffer[10] = $12 and buffer[11] = $34 and calculate the decimal number of the hex $1234 ( 4660d ). Using the hextoi('1234') is the goal but HOW can I make the buffer[10] and buffer[11] to be the ASCII of '1234' ?
Thanks,
George
could you please help me on the below issue ?
I have a hexadecimal array Buffer[] = $00,$00,$00,$00,$00,$05,$00,$03,$02,$12,$34
What I need to do is to get the two last hex's, buffer[10] = $12 and buffer[11] = $34 and calculate the decimal number of the hex $1234 ( 4660d ). Using the hextoi('1234') is the goal but HOW can I make the buffer[10] and buffer[11] to be the ASCII of '1234' ?
Thanks,
George
0
Comments
Not sure why you need ASCII there.
If you need to convert your value to an ASCII string to show on a text field: itoa(value)