Transmit flow control may occur: • between
data terminal equipment (DTE) and a
switching center, via
data circuit-terminating equipment (DCE), the opposite types interconnected straightforwardly, • or between two devices of the same type (two DTEs, or two DCEs), interconnected by a
crossover cable. The
transmission rate may be controlled because of
network or DTE requirements. Transmit flow control can occur independently in the two directions of data transfer, thus permitting the transfer rates in one direction to be different from the transfer rates in the other direction. Transmit flow control can be • either
stop-and-wait, • or use a
sliding window. Flow control can be performed • either by
control signal lines in a data communication interface (see
serial port and
RS-232), • or by reserving in-band control characters to signal flow start and stop (such as the
ASCII codes for
XON/XOFF).
Hardware flow control In common RS-232 there are pairs of control lines which are usually referred to as
hardware flow control: • RTS (request to send) and CTS (clear to send), used in
RTS flow control • DTR (
data terminal ready) and DSR (
data set ready), used in DTR flow control Hardware flow control is typically handled by the DTE or "master end", as it is first raising or asserting its line to command the other side: • In the case of RTS
control flow, DTE sets its RTS, which signals the opposite end (the slave end such as a DCE) to begin monitoring its data input line. When ready for data, the slave end will raise its complementary line, CTS in this example, which signals the master to start sending data, and for the master to begin monitoring the slave's data output line. If either end needs to stop the data, it lowers its respective "data readiness" line. • For PC-to-modem and similar links, in the case of DTR flow control, DTR/DSR are raised for the entire modem session (say a dialup internet call where DTR is raised to signal the modem to dial, and DSR is raised by the modem when the connection is complete), and RTS/CTS are raised for each block of data. An example of hardware flow control is a
half-duplex radio modem to computer interface. In this case, the controlling software in the modem and computer may be written to give priority to incoming radio signals such that outgoing data from the computer is paused by lowering CTS if the modem detects a reception. • Polarity: • RS-232 level signals are inverted by the driver ICs, so line polarity is TxD-, RxD-, CTS+, RTS+ (clear to send when HI, data 1 is a LO) • for microprocessor pins the signals are TxD+, RxD+, CTS-, RTS- (clear to send when LO, data 1 is a HI)
Software flow control Conversely, XON/XOFF is usually referred to as software flow control. == Open-loop flow control ==