Flow Control

A serial interface may be configured as either Data Terminal Equipment (DTE) or Data Communications Equipment (DCE), which specifies which pins are used to transmit and receive data and control signals. Traditionally, serial ports are configured as DTE, and communications devices such as modems are configured as DCE. In practical terms, however, the DTE/DCE differentiation doesn’t much matter. Any serial device, DTE or DCE, can communicate with any other serial device, DTE or DCE, so long as the proper cable is used to link them.

Ideally, a DCE would always be ready to receive data when the DTE was ready to send it. In the real world, that’s not always the case. For example, a degraded telephone connection may render the local modem (DCE) incapable of sending data to the remote modem as fast as it is receiving data from the local DTE. DCE devices may be equipped with buffers to allow them to temporarily store a limited amount of data. This accommodates short-term mismatches between DTE-to-DCE data rate and DCE-to-DCE data rate, but does nothing to accommodate mismatches of long or permanent duration.

The methods used to accommodate such mismatches are called flow control. Using flow control, the DCE device notifies the DTE device to stop sending data temporarily. When the DCE device has cut down on the backlog, it notifies the DTE that it is again ready to receive data. Flow control may be implemented in two ways.

Software flow control

With software flow control ...

Get PC Hardware in a Nutshell, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.