Hex value of ASCII character back to text.


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305

    Default Hex value of ASCII character back to text.

    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.

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,388


    Did you find this post helpful? Yes | No

    Default Re: Hex value of ASCII character back to text.

    chr var byte

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

  3. #3
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: Hex value of ASCII character back to text.

    As simple as that, eh? lol

Similar Threads

  1. HEX byte to ASCII output...
    By johnmaetta in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 13th August 2011, 00:31
  2. Hex to Ascii to Decimal
    By khoog in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 31st July 2009, 05:27
  3. hex ascii help please
    By ffr58kk90 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 29th December 2006, 21:09
  4. Converting ASCII to HEX
    By BobP in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 27th September 2006, 10:21
  5. ascii characters to hex
    By Peter1960 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 26th January 2006, 04:06

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts