Hardware Flow Control in the Serial Interface

written by: Emy Roberts; article published: year 2010, month 06;

In: Root » Computers and technology » Memory Processor Motherboards and buses

  Share  
|
  PL  |  NL  |  FR  |  ES  |  PT  |  IT  |  DE  |  DK  |  NO  |  SE  |  FI  |  GR  |  JP  |  CN  |  KR  |  RU  |  AE


Several of the signals in the serial interface are specifically designed to help handle flow control. Rather than a simple on and off operation, however, they work together in an elaborate ritual.

The profusion of signals seems overkill for keeping a simple connection such as that with a plotter under control, and it is. The basic handshaking protocol for a serial interface is built around the needs of modem communications. Establishing a modem connection and maintaining the flow of data through it is one of the more complex flow control problems for a serial port. Even a relatively simple modem exchange involves about a dozen steps with a complex interplay of signals. The basic steps of the dance would go something like this:

  1. The telephone rings when a remote modem wants to make a connection. The data set sends the ring indicator signal to the data terminal to warn of the incoming call.
  2. The data terminal switches on or flips into the proper mode to engage in communications. It indicates its readiness by sending the data terminal ready signal to the data set.
  3. Simultaneously, it activates its request to send line.
  4. When the data set knows the data terminal is ready, it answers the phone and listens for the carrier of the other modem. If it hears the carrier, it sends out the carrier detect signal.
  5. The data set negotiates a connection. When it is capable of sending data down the phone line, it activates the data set ready signal.
  6. Simultaneously, it activates its clear to send line.
  7. The data set relays bytes from the phone line to the data terminal through the receive data line.
  8. The data terminal sends bytes to the data set (and thence the distant modem) through the transmit data line.
  9. Because the phone line is typically slower than the data terminal-to-data set link, the data set quickly fills its internal buffer. It tells the data terminal to stop sending bytes by deactivating the clear to send line. When its buffer empties, it reactivates clear to send.
  10. If the data terminal cannot handle incoming data, it deactivates its request to send line. When it can again accept data, it reactivates the request to send line.
  11. The call ends. The carrier disappears, and the data set discontinues the carrier detect signal, clear to send signal, and data set ready signal.
  12. Upon losing the carrier detect signal, the data terminal returns to its quiescent state, dropping its request to send and data terminal ready signals.

Underlying the serial dance are two rules. 1. The data terminal must see the data set ready signal as well as the clear to send signal before it will disgorge data. 2. The data set must see the data terminal ready and request to send signals before it will send out serial data. Interrupting either of the first pair of signals will usually stop the data terminal from pumping out data. Interrupting either of the second pair of signals will stop the data set from replying with its own data.

The carrier detect signal may or may not enter into the relationship. Some data terminals require seeing the carrier detect signal before they will transmit data. Others just don't give a byte one way or the other.

Share

Disclaimer

1) E-articles is not responsible for the information contained by this article as well for any and all copyright infringements by authors and writers. E-articles is a free information resource. If you suspect this article for any copyright infringement, please read the terms of service and contact us or use the "Report this article" button on this page to investigate the problem.
2) E-articles is not responsible for inaccuracies, falsehoods, or any other types of misinformation this article may contain and will not be liable for any loss or damage suffered by a user through the user's reliance on the information gained here.