Hardware Reference
In-Depth Information
Table 9-4.
Hardware Flow Controls
DTE
Direction
DCE
Description
Active
RTS
→
RTS
Request to send(†)
Low
CTS
←
CTS
Clear to send(†)
DSR
←
DSR
Data set ready
Low
DTR
→
DTR
Data terminal ready
† Primary flow control signals
The most important signals are the ones marked with a dagger in Table
9-4
. When
CTS is active (mark), for example, the DCE (Pi) is indicating that it is OK to send data.
If the DCE gets overwhelmed by the volume of data, the CTS signal will change to the
inactive (space) state. Upon seeing this, the DTE (laptop) is required to stop sending data.
(Otherwise, loss of data may occur.)
Similarly, the laptop operating as the DTE is receiving data from the DCE (Pi). If the
laptop gets overwhelmed with the volume of incoming data, the RTS signal is changed to
the inactive state (space). The remote end (DCE) is then expected to cease transmitting.
When the laptop has caught up, it will reassert RTS, giving the DCE permission to resume.
The DTR and DSR signals are intended to convey the readiness of the equipment
at each end. If the terminal was deemed not ready (DTR), DSR is not made active by the
DCE. Similarly, the terminal will not assert DTR unless it is ready. In modern serial links,
DTR and DSR are often assumed to be true, leaving only CTS and RTS to handle flow
control.
Where flow control is required, hardware flow control is considered more reliable
than software flow control.
Software Flow Control
To simplify the cabling and the supporting hardware for serial communications, the
hardware flow controls can be omitted/ignored. In its place, a data protocol is used instead.
Initially, each end of the link assumes readiness for reception of data. Data is sent
until an
XOFF
character is received, indicating that transmission should stop. The receiver
sends the
XON
character when it is ready to resume reception again. These software flow
control characters are shown in Table
9-5
.
Table 9-5.
Software Flow Control Characters
Code
Meaning
ASCII
Hex
Keyboard
XOFF
Pause transmission
DC3
13
Control-S
XON
Resume transmission
DC1
11
Control-Q