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

ASCII-HEX & Binary on RSR232

Hi,

Normally when we use printf to output on RSR232, in which format it outputs.

ascii-hex or binary.How to set the output format.

rutu

Parents
  • "The output is in ASCII characters."

    To be precise (as the original post seems very vague), the output is a string of bytes where the numerical value of each byte is the ASCII code for a character.

    Here are some examples of numerical byte values (shown in binary, octal, decimal, and hex) and the corresponding characters from the ASCII code:

    Binary    Octal  Decimal  Hex  ASCII
    --------  -----  -------  ---  -----
    00110000  060    48       30   '0'
    00110001  061    49       31   '1'
    01000001  101    65       41   'A'
    01100001  141    97       61   'a'
    

Reply
  • "The output is in ASCII characters."

    To be precise (as the original post seems very vague), the output is a string of bytes where the numerical value of each byte is the ASCII code for a character.

    Here are some examples of numerical byte values (shown in binary, octal, decimal, and hex) and the corresponding characters from the ASCII code:

    Binary    Octal  Decimal  Hex  ASCII
    --------  -----  -------  ---  -----
    00110000  060    48       30   '0'
    00110001  061    49       31   '1'
    01000001  101    65       41   'A'
    01100001  141    97       61   'a'
    

Children