Metrologic Optimus S Programming Manual page 114

"c" programming guide
Table of Contents

Advertisement

108
"C" Programming Guide For Optimus S/R
3. XON/XOFF: Instead of using RTS/CTS signals, two special characters are used for
Note: Flow control is only applicable to the direct RS-232 COM port, which is usually
However, due to the UART design (on-chip temporary transmission buffer), up
to five characters might be sent after the CTS signal is de-asserted.
Receive
The RTS signal is used to indicate whether the storage of receive buffer is free
or not. If the receive buffer cannot take more than 5 characters, the RTS signal is
de-asserted, and it instructs the sending device to halt the transmission. When its
receive buffer becomes enough for more than 15 characters, the RTS signal
becomes asserted again, and it instructs the sending device to resume
transmission. As long as the buffer is sufficient (may be between 5 to 15
characters), the received data can be stored even though the RTS signal has just
been negated.
software flow control, i.e. XON (hex 11) and XOFF (hex 13). XON is used to
enable transmission while XOFF to disable transmission.
Transmit
When the port is opened, the transmission is enabled. Then every character
received is examined to see if it is normal data or flow control codes. If an
XOFF is received, transmission is halted. It is resumed later when XON is
received. Just like the RTS/CTS control, up to two characters might be sent after
an XOFF is received.
Receive
The received characters are examined to see if it is normal data (which will be
stored to the receive buffer) or a flow control code (set/reset transmission flag
but not stored). If the receive buffer cannot take more than 5 characters, an
XOFF control code is sent. When the receive buffer becomes enough for more
than 15 characters, an XON control code will be sent so that the transmission
will be resumed. As long as the buffer is sufficient (may be between 5 to 15
characters), the received data can be stored even when in XOFF state.
Note that if receiving and transmitting are concurrently in operation, the
XON/XOFF control codes might be inserted into normal transmit data string.
When using this method, make sure that both sides feature the same control
methodology; otherwise, dead lock might happen.
assigned as COM 1.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Optimus r

Table of Contents