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

How to input ASCII values coming from serial.

E.g if 8-bit ASCII code '80' of alphabet P, or 8-bit ASCII code '49' of digit 1 is recieved at serial port, how do I input this ASCII.

Parents
  • "When I recieve 49, do I recieve 1 or the ASCII 49."

    Computers store numbers in binary. The UART receives data in binary. It is just a representational issue.

    00110001 binary
    equals
    49 decimal
    equals
    31 hex
    equals
    61 octal
    equals
    1 ASCII
    etc

    Maybe you should read an introductory text of some sort. Alternatively, as I understand that reading is unfashionable these days, you could experiment using the debugger.

Reply
  • "When I recieve 49, do I recieve 1 or the ASCII 49."

    Computers store numbers in binary. The UART receives data in binary. It is just a representational issue.

    00110001 binary
    equals
    49 decimal
    equals
    31 hex
    equals
    61 octal
    equals
    1 ASCII
    etc

    Maybe you should read an introductory text of some sort. Alternatively, as I understand that reading is unfashionable these days, you could experiment using the debugger.

Children