PDA

View Full Version : Hex value of ASCII character back to text.



jmgelba
- 13th August 2014, 19:09
I am trying to take the hex value of an ASCII character stored in EEPROM , convert it back to a text character and send it to a device on the PIC serial port using serout or serout2.

So lets say I have 31 stored in EEPROM location 00, this is the equivalent of "1" as text. How do I turn 0x31 in to "1"?

Thanks.

richard
- 14th August 2014, 00:04
chr var byte

read 0,chr
SEROUT pin,mode,[chr]

jmgelba
- 14th August 2014, 18:51
As simple as that, eh? lol