User`s manual
92 www.rabbit.com Serial and TCP Protocols
where an application sends short messages out then waits for an equally short response. In this case, the
flow control happens automatically by nature of the short messages and query/response protocol.
End-to-end flow control usually relies to some extent on the lower level flow controls: serial port and net-
work. Network flow control is handled by TCP. TCP has a high performance flow control mechanism built
in, which is always enabled, so it does not have to be considered most of the time.
Serial port flow control does need to be considered, since both devices connected by the serial port need to
agree about the flow control mechanism to use; there is no “one size fits all” mechanism as there is for
TCP. If a choice is available, it is best to use a form of hardware flow control, since this is most reliable
and has the best performance. The most common hardware flow control is RTS/CTS, because those signal
lines are usually devoted to this purpose. DTR/DSR is rarely used, but some equipment may require it.
The EM1500 handles hardware flow control as follows:
• When the receive buffer becomes approximately half full (about 500 bytes) then the RTS line is
dropped. The sender should see this and send no more than 500 additional bytes while the RTS line
is dropped. This is quite a large leeway - most devices will stop sending much sooner than this.
When RTS is re-asserted, then the buffer can receive the next 1000 bytes.
• If the EM1500 sees CTS being dropped, it will stop sending until CTS is asserted again. The
EM1500 does not react instantly, since it only checks the CTS line at 488 µs intervals. Thus, at the
highest supported speed of 230.4 kbps, up to 14 characters will be sent after CTS is dropped. This
is not usually a problem, since most devices capable of operating at this speed have at least a 16-
byte leeway.
• If the EM1500 sees CTS asserted again, it will resume transmission. Again, there is a possible 488
µs interval before the EM1500 comes around to sampling the CTS line, however the average will
be 244 µs. This may cause a slight drop in overall throughput, compared to that which is theoreti-
cally attainable, if flow control is necessitating a lot of stops and starts.