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

i copied old mesage about rs23

Hallo everyone,
I have problem with communication over serial port.

This is what I am having problem with:

I need to make communication with device which has usb on rs232 convertor and fifo memory.

I sent data to fifo memory in same time device read data from fifo memory.

When micro (in device) sees that memory is full, it change state of CTS signal. CTS signal stays in that state until memory is half full.

I have problem to write code in C that sends data to device but considering CTS.

I send data as char byte array, memory is 4K , speed is 38400

Does anyone have a clue how I can solve this mistery

Milan

Parents
  • What is the mistery [sic!]?

    Why don't you just read the CTS state before you insert characters into the FIFO? That is quite the same as for a "normal" UART where you have a "not full" bit somewhere in a status register that tells if you can fill up the UART FIFO (or maybe just the transmit holding register) or if you need to wait until one or more characters have been sent.

    Baudrate, FIFO size, send buffer size etc is really irrelevant to the problem. It's just a question of "fits at least one more character" or "does not fit more characters".

Reply
  • What is the mistery [sic!]?

    Why don't you just read the CTS state before you insert characters into the FIFO? That is quite the same as for a "normal" UART where you have a "not full" bit somewhere in a status register that tells if you can fill up the UART FIFO (or maybe just the transmit holding register) or if you need to wait until one or more characters have been sent.

    Baudrate, FIFO size, send buffer size etc is really irrelevant to the problem. It's just a question of "fits at least one more character" or "does not fit more characters".

Children