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

[ouestion on rs232]

Hi ,
I have designed a circuit with µPSD3200 which communicates with PC , µPSD3200 data to pc and gets data from pc with rs232 .
i want to send and receive numbers from zero two FF , not ascii , just hex code from 00 to FF (in decimal : 0 to 255) .
but , i have read that the computer and micro sends ascii code , and ascii codes does not support the whole range of 00 to FF , so what shall i do ?

omid

Parents
  • Sorry but I was away on other business, so I couldn't respond to your question earlier. I hoped that other stand-in posters may have been able to help you with your enquiry, but unfortunately it would appear that, once again, the onerous task has fallen to me.

    You do not yet understand your situation fully enough. ASCII is a way of interpreting binary data.

    Set up your board to transmit serial communications at your chosen baud rate and "N,8,1" communication parameters (that is to say, no parity, 8 data bits, 1 stop bit.)

    Remember that the transmit pin of one device must be connected to the receive pin of the other and vice-versa. They are different pins on 9-pin connectors vs. 25-pin connectors. Watch out.

    On the PC side you need to configure the serial port to match the speed and communication parameters of the board. You may also need to tell your compiler or application to treat the data as binary and to declare no "flow control."

    RS-232 serial communication is simple in theory. In practice there are a number of snags and pitfalls like baud, parameters, wiring, hardware/software flow control, error control, etc.

    You should study Jan Axelson's serial communications book. Its widely available from all good book stores.

Reply
  • Sorry but I was away on other business, so I couldn't respond to your question earlier. I hoped that other stand-in posters may have been able to help you with your enquiry, but unfortunately it would appear that, once again, the onerous task has fallen to me.

    You do not yet understand your situation fully enough. ASCII is a way of interpreting binary data.

    Set up your board to transmit serial communications at your chosen baud rate and "N,8,1" communication parameters (that is to say, no parity, 8 data bits, 1 stop bit.)

    Remember that the transmit pin of one device must be connected to the receive pin of the other and vice-versa. They are different pins on 9-pin connectors vs. 25-pin connectors. Watch out.

    On the PC side you need to configure the serial port to match the speed and communication parameters of the board. You may also need to tell your compiler or application to treat the data as binary and to declare no "flow control."

    RS-232 serial communication is simple in theory. In practice there are a number of snags and pitfalls like baud, parameters, wiring, hardware/software flow control, error control, etc.

    You should study Jan Axelson's serial communications book. Its widely available from all good book stores.

Children