Introduction to Data Communications
Previous 18c. Software Handshaking Next

18c. Software Handshaking (Xon/Xoff)

Software Handshaking does not use the RS-232D control signals, it uses the software commands Xon/Xoff to control the data flow. Do not use software handshaking with a modem, because you will lose several important function of the modem such as: RI, and CD.

Xon Transmit On - ASCII Character DC1
Xoff Transmit Off - ASCII Character DC2

Software handshaking is a simple flow control method that is used mainly with DTE to DTE and DTE to Serial Printer connections. The receiving device controls the flow of data by issuing Xon (okay to transmit data) commands and Xoff (stop - let me catch up) commands. A good example is the DTE to Serial Printer connection.

For example, a dot-matrix printer cannot physically print faster than a transfer rate of 300 bps. Printers are usually equipped with a memory buffer to store the data before it is printed. The printer buffer allows large chunks of data to be downloaded to the printer from the DTE, thereby freeing up the DTE to do other tasks rather than wait for a page to be printed.

When the data is first being downloaded to the printer, the printer issues a Xon command to the DTE. As the print buffer becomes full (90%), the printer issues an Xoff command to stop transmitting data until the printer catches up. When the print buffer becomes almost empty (20%) than the printer issues a Xon command. This goes on until the complete document is printed.


18d. Software Null Modem

Since we are using software to control the data flow, we can eliminate a few of the control lines used in the Hardware Null Modem cable. In its simplest form, the Null Modem cable consists of SGND, and the TXDs & RXDs crossed.

Usually we find that we have to add a few control lines to fool the DTE's hardware. There is no standard Software Null Modem configuration for Xon/Xoff. The exact connection will vary from device manufacturer to device manufacturer.


Introduction to Data Communications
Previous Table of Contents Next