Converting a byte to ASCII
Posted: Tue Oct 13, 2020 7:43 pm
Hi
I'm reading the internal part number number of a device over I2C.
The part number is in the form HDL12345678 and it is transmitted character by character as ASCII ie H = 72, D = 68, L =76 etc
I want to store this in a string variable 11 characters long.
i.e. StringVar = StringVar + ASCII(byte)
So StringVar will end up as "HDL12345678" after receiving the I2C data byte by byte.
I seem to have a mental block on how to do this. !!!
Any help appreciated
Clive44
I'm reading the internal part number number of a device over I2C.
The part number is in the form HDL12345678 and it is transmitted character by character as ASCII ie H = 72, D = 68, L =76 etc
I want to store this in a string variable 11 characters long.
i.e. StringVar = StringVar + ASCII(byte)
So StringVar will end up as "HDL12345678" after receiving the I2C data byte by byte.
I seem to have a mental block on how to do this. !!!
Any help appreciated
Clive44