Software 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


The alternate means of handshaking, software flow control, requires your serial peripheral and PC to exchange characters or tokens to indicate whether they should transfer data. The serial peripheral normally sends out one character to indicate it can accept data and a different character to indicate that it is busy and cannot accommodate more. Two pairs of characters are often used, XON/XOFF and ETX/ACK.

In the XON/XOFF scheme, the XOFF character sent from your serial peripheral tells your PC that its buffer is full and to hold off sending data. This character is also sometimes called DC1 and has an ASCII value of 19 or 013(Hex). It is sometimes called Control-S. (With some communications programs, you can hold down the Control key and type S to tell the remote system to stop sending characters to your PC). Once your serial peripheral is ready to receive data again, it sends out XON, also known as DC3, to your PC. This character has an ASCII value of 17 or 011(Hex). It is sometimes called Control-Q. When you hold down Control and type Q into your communications program, it cancels the effect of a Control-S.

ETX/ACK works similarly. ETX, which is an abbreviation for End TeXt tells your PC to hold off on sending more text. This character has an ASCII value of 3 (decimal or hexadecimal) and is sometimes called Control-C. ACK, short for Acknowledge, tells your PC to resume sending data. It has an ASCII value of 6 (decimal or hexadecimal), and is sometimes called Control-F.

There's no issue as to whether hardware or software flow control is better. Both work and that's all that's necessary. The important issue is what kind of flow control your serial peripheral and software use. You must assure that your PC, your software, and your serial peripheral use the same kind of flow control.

Your software will either tell you what it prefers or give you the option of choosing when you load the driver for your peripheral. On your serial peripheral, you select serial port flow control when you set it up. Typically, this will involve making a menu selection or adjusting a DIP switch.

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.