Appendix C
The Serial Connection
© National Instruments Corp.
C-7
GPIB-232CT User Manual
its buffer overflows. The GPIB-232CT comes equipped with either a 64K
RAM buffer or a 256K RAM buffer, 32K of which is used for the serial
input buffer.
When its RAM buffer is nearly full, the GPIB-232CT is capable of
handshaking with the serial host to stop data transmission. When the buffer
is almost empty, the GPIB-232CT can again handshake with the serial host
to start data transmission. The GPIB-232CT is capable of using both the
XON/XOFF and the hardware handshaking protocols. The hardware
handshake is always active during RS-232 transfers. You can turn the
XON/XOFF handshake on or off by calling
xon
.
Hardware Handshake
The hardware handshake function is always active during RS-232 transfers
and uses the Request to Send (RTS) and Clear to Send (CTS) signal lines.
When the GPIB-232CT is ready to accept serial data, it asserts the RTS
line. This signal remains asserted until the GPIB-232CT's data buffer is
almost full. At this point, the GPIB-232CT unasserts the RTS line,
signaling to the serial host that the GPIB 232CT is no longer ready to
accept data. The serial host should monitor the RTS line and suspend data
transmission whenever the RTS line becomes unasserted. The GPIB-
232CT asserts RTS when it is again ready to receive serial data.
The GPIB-232CT is also able to suspend transmission when the serial
device is no longer ready to accept data. The GPIB-232CT is configured to
immediately stop transmission of serial data when CTS becomes
unasserted. The GPIB-232CT resumes transmission as soon as CTS is
reasserted.
Because most serial devices use the same form of hardware handshaking as
the GPIB-232CT, you can achieve bi-directional flow control by using a
serial cable that connects the GPIB-232CT's RTS signal to the serial
device's CTS signal. In addition, the serial device's RTS signal should be
connected to the GPIB-232CT's CTS signal. This setup allows each device
to monitor the other device's RTS signal and to suspend transmission when
necessary to prevent data loss.
Note:
CTS must be asserted for the GPIB-232CT to transmit data. If you
do not use hardware handshaking, you can usually make CTS
asserted by tying together the CTS and DTR serial signals of the
GPIB-232CT.