Hardware Reference
In-Depth Information
Break
With asynchronous communication, it is also possible to send and receive a break signal .
This is done by stretching the start bit beyond the data bits and the stop bit(s), and
eventually returning the line to the mark state. When the receiver sees a space instead of a
mark for the stop bit, it sees a framing error .
Some UARTs distinguish between a framing error and a break by noting how long the
line remains in the space state. A simple framing error can happen as part of noisy serial
line communications (particularly when modems were used) and normally attributed to
a received character error. Without break detection, it is possible to assume that a break
has been received when several framing errors occur in a sequence. Short sequences of
framing errors, however, can also just indicate a mismatch in baud rates between the two
end points.
Flow Control
Any link that transmits from one side to a receiver on the other side has the problem
of flow control. Imagine a factory assembly line where parts to be assembled arrive at
the worker's station faster than he can assemble them. At some point, the conveyor belt
must be temporarily stopped, or some parts will not get assembled. Alternatively, if the
conveyor belt is reduced in speed, the assembly worker will always be able to keep up, but
perhaps at a slower than optimal pace.
Unless the serial link receiver can process every character of data as fast as it arrives,
it will need flow control. The simplest approach is to simply reduce the baud rate, so that
the receiver can always keep up. But this isn't always satisfactory and leads to a reduced
overall throughput. A logging application might be able to write the information quickly,
except when writes occur to an SD card, for example.
A better approach is to signal to the transmitter to stop sending when the receiver
is bogged down. Once the receiver catches up, it can then tell the transmitter to resume
transmission. Note that this problem exists for both sides of a serial link:
Data transmitted to the terminal (DTE)
Data transmitted to the data communications equipment (DCE)
Two forms of flow control are used:
Hardware flow control
Software flow control
Hardware Flow Control
Hardware flow control uses additional signal lines to regulate the flow of data. The RS-232
standards have quite an elaborate set of signals defined, but the main signals needed for
flow control are shown in Table 9-4 . Unlike the data line, these signals are inactive in the
space state and active in the mark state.
 
Search WWH ::




Custom Search