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

settng up rs232 variable

Hi, can anyone tell me how i would set up a variable that expects a certain amount of data to be received through rs232.

i.e. to receive 18 bytes of data only once the the rx pin has been set to input.

thanks guys

Parents
  • "tell me how i would set up a variable that expects a certain amount of data to be received through rs232."

    Variables don't "expect" anything. You need to write software that can be in a state of "expecting".

    Also, variables neither know nor care where their data comes from - they just hold it.

    In 'C', I suggest that you think about an array or, perhaps, that special case of an array - the string.

    Receiving asynchronous serial data at the RI pin will involve using the UART.

    Connecting true RS232 voltage levels to the RI pin will probably damage it - be sure to use an RS232 transceiver (eg, MAX232).

Reply
  • "tell me how i would set up a variable that expects a certain amount of data to be received through rs232."

    Variables don't "expect" anything. You need to write software that can be in a state of "expecting".

    Also, variables neither know nor care where their data comes from - they just hold it.

    In 'C', I suggest that you think about an array or, perhaps, that special case of an array - the string.

    Receiving asynchronous serial data at the RI pin will involve using the UART.

    Connecting true RS232 voltage levels to the RI pin will probably damage it - be sure to use an RS232 transceiver (eg, MAX232).

Children