Vetra Systems Corporation   The Industry's Broadest line of KVM Products

Application Note V-113
USB-331 Data Throughput and CTS Behavior 

This Application Note provides information for users of the USB-331 to determine what, if anything, they need to do to insure data integrity and prevent potential data loss. The main factors under the user's control are baud rate, character rate, character block (burst) size, and handling of the CTS signal, generated by the USB-331.

Please note that "character rate" and "baud rate" are not the same and should not be confused. "Baud rate" is the bit rate of the RS-232 signal. "Character rate" is the number of 8-bit bytes, or characters, that are sent in one second to the USB-331. Note that at any given baud rate, characters may be sent at slower rates than the possible maximum.

Before the effect on throughput rate of baud rate and character rate are discussed, a brief review of the architecture and operation of Vetra's USB-331 "SmartPipe"™ and the USB keyboard message protocol is presented. The USB-331 stores each incoming RS-232 byte in an internal 64-character buffer. When the buffer fills with 32 bytes, and under certain other circumstances given below, the USB-331 deactivates the CTS line (pin 7) to avoid potential loss of incoming data. The data in the USB-331 buffer is transferred to the USB port as keyboard data messages under control of the host computer. The request rate for keyboard data from the host computer, PC, MAC or another computer equipped with a supported USB port, is the main limitation on the USB-331 throughput rate. The maximum standard USB keyboard input rate is 600 characters/second for all unshifted (lower case) or all shifted (upper case) characters. This is the theoretical USB-specified rate, which may not be supported by a given operating system or by a specific application. The rate can be as low as 50 characters/sec for certain data patterns, such as a sequence of identical characters, “1111111111” for example. These maximum rates can be exceeded for short data bursts, since incoming characters are stored in an internal USB-331 data buffer. The maximum bursts for given character and baud rates are given later in this Note.

RS-232 Input Baud Rate:

The maximum input character rates for all baud rates that are supported by the USB-331 are shown in the table below. These character rates are for the condition where each byte follows another without a break. For comparison, the maximum USB keyboard character rate for the best and worst condition is also given.

 Baud Rate

 Max. Character Rate Characters/sec

 Maximum USB Rate, all unshifted

 Maximum USB Rate, identical characters

300 

30

 600

 50

1200 

120 

 600

 50

2400 

240 

 600

 50

4800 

480 

 600

 50

9600

960 

 600

 50

19200

1920

 600

 50

The table shows that all baud rates, except 300, exceed the worst case (a sequence of identical characters) character rate of 50 characters/second, if characters are sent continuously. Baud rates 9600 and 19,200 exceed the best case of 600 characters/second, if characters are sent continuously. To prevent data loss, the user must either:
a) limit data to block sizes given later in this Note, and observe the time between blocks,
b) throttle data at the source to control the character rate to be 50 or 600 characters/sec or less, or
c) obey CTS.

a) Character Block (Burst) Size Limits:

The USB-331 has an internal buffer that can store 64 characters of incoming data. If incoming data does not obey CTS, but can be limited in the number of characters sent at any given time (burst size), the table below gives maximum burst size for the six baud rates supported by the USB-331. The time between bursts of maximum size must allow the USB-331 buffer to empty. The time to empty the 64 character buffer of all unshifted or all shifted characters is 0.107 seconds, and 1.28 seconds if the characters alternate shifted/unshifted. If bursts are limited to the size given and the time between bursts is longer than specified above, no data loss will occur.

 Baud Rate

 Max. Character Rate Characters/sec

 Max. Burst Size All Characters Unshifted or Shifted

 Max. Burst Size Sequence of Identical Characters

300

30

no limit 

no limit

1200

120

no limit

108

2400

240

no limit

80

4800

480

no limit

70

9600

960

170

66

19200

1920

92

64 

Note: “no limit” means that data can be sent continuously.

b) Throttle data at the source to control character rate:

Another approach to avoid data loss for the cases above where a maximum burst size is given is to control the character rate to be 50 or 600 characters/sec or less, depending on the nature of the data.

c) CTS Signal:

In addition to controlling the baud rate, character rate, or the burst size, the user also has the option to set the source to obey the CTS signal, that is, stop sending data whenever the CTS signal goes inactive. If the RS-232 data source is strict in obeying the CTS signal from the USB-331, no data will be lost. By "strict" is meant that the source immediately stops sending data when CTS goes inactive. Many PC's have a FIFO buffer associated with the COM port, and will continue to send data after CTS goes inactive until the FIFO buffer is empty. The USB-331 has a tolerance of 32 characters after CTS goes inactive. At the time CTS goes inactive, its internal buffer still has room for the 32 characters. If the source sends no more data than 32, the potential for data loss is minimal.

In addition, the CTS signal will also go inactive when the USB-331 executes certain internal processes that are not interruptible. When they are being executed, CTS drops to warn the RS-232 data source that the USB-331 is not ready to accept data.

Rate at which the USB port accepts keyboard data:

The USB port to which a keyboard or a device behaving like a keyboard, such as the USB-331, is connected requests keyboard data every 10 ms, or 100 times/sec. For each request, the keyboard can send up to six key codes and the state of “modifier” keys, such as Shift, Alt or Control. If each time the USB port requests keyboard data, a different set of six keys is pressed, a rate of 600 characters, or keys, per second results. However, if a different modifier applies to each successive key, such as alternating lower/upper case keys, only one key code can be sent in each message. The result is a rate of 100 characters, or keys, per second. If successive identical keys are sent, a break message must be sent to the host, resulting in a rate of 50 characters, or keys, per second.

These rates are hardware rates and do not take into account how the operating system, such as Windows, or how an application to which keyboard data is directed, handle keyboard data. It is possible that some applications cannot properly process keyboard data at a rate of 600 characters per second.

Summary:

If the average character rate of the RS-232 data source is less than 50 char/sec, the possibility of data overrun (loss) is minimal. If the average character rate exceeds 50 characters/second, the user has several options to insure data integrity. The user can:

a) Throttle the data source to an average of 50 characters/second;
b) Limit the burst size sent to the sizes given in the table earlier, and insure at least 4.71 seconds between bursts.
c) Obey CTS, with no more than 32 characters sent after CTS is deactivated.


 [ Home ]

  [ Products ]

  [ About Us ]

 [ Site Map ]

 [ Contact Us ]

 [ Order Info ]

 [ What's New ]

 [ KVM Switches ]

 [ Dual-Head KVM Switches ]

  [ Touch Screen Products ]

 [ Video Products ] 

 [ KVM Splitters ]

 [ PC Keyboard Encoders ]

 [ Keyboard & Mouse Terminators ]

 [ KVM Extenders ]

 [ Safe Computing Products ]

 [ Foot-operated Devices ]

 [ Protocol Converters ]

 [ Accessories ]

Vetra Systems Corporation logo

 VETRA Systems Corporation
275-J Marcus Blvd. Hauppauge, NY 11787 USA
Tel: 631-434-3185 Fax: 631-434-3516 e-mail: sales@vetra.com