Hello,
peg wrote:
From National Semiconductors page for the PC16550D:
The PC16550D is an improved version of the original 16450 Universal Asynchronous Receiver/Transmitter (UART). Functionally identical to the 16450 on powerup (CHARACTER mode)* the PC16550D can be put into an alternate mode (FIFO mode) to relieve the CPU of excessive software overhead.
In this mode internal FIFOs are activated allowing 16 bytes (plus 3 bits of error data per byte in the RCVR FIFO) to be stored in both receive and transmit modes. All the logic is on chip to minimize system overhead and maximize system efficiency. Two pin functions have been changed to allow signalling of DMA transfers.
And there are devices with bigger buffers as well!
Yes, I believe FIFOsize up to 64. I am not sure of the situation when USB-to-serial converters are used.
However, this is important when using handshaking to prevent receive buffer over-run in the MCU.
In zonte's case, assuming a buffer of adequate size is used, handshaking would be likely to occur after data has been received (and the FIFO at the other end is empty), and the received data is about to be processed. This situation can probably be ensured by checking for Idle line condition immediately before de-activating CTS.
For other cases where receive buffer over-run must be prevented, the required handshake threshold that needs to be allowed would probably depend on whether the CTS signal has any direct control over FIFO output. I am not familiar enough with the UART devices.
For Xon/Xoff handshaking, we could probably assume that the FIFO would need to become empty for transmission to cease.
I guess I will need to conduct some actual tests using various terminal emulation programs to see what the typical situation is likely to be. We seem to be opening a Pandora's box.
Regards,
Mac