Asynchronous Communication

This chapter is a précis of Chapter 5 of Doug Comer's book [Comer 2004] and covers how electrical current is used to transfer digital information across short distances.

Communication is called asynchronous if the sender and receiver do not need to synchronise before each transmission. A sender can wait arbitrarily long between transmissions and the receiver must be ready to receive data when it arrives.

Electric Current

A simple communication system uses a small electric current to encode data, e.g. a negative voltage represents a one (1) and a positive voltage represents a zero (0). This is illustrated in the waveform diagram of Figure 1.

Positive and negative voltages
Figure 1: Positive and negative voltages

The sender places a negative voltage on the wire for a short time and then returns the voltage to zero - this represents a one. The receiver senses the negative voltage and records that a one arrived.

To ensure that communications hardware built by different vendors will interoperate, the specifications for communications systems are standardised. Organisations such as the Electronic Industries Association (EIA), the International Telecommunications Union (ITU) and the Institute for Electrical and Electronical Engineers (IEEE) publish these specifications as standards.

RS-232

This particular standard produced by the EIA is widely used to transfer characters across copper wires between a computer and a device such as a keyboard, modem, or teminal. RS-232 defines serial communication because the bits travel on the wire one after another. The transmission is asynchronous because the sender and receiver do not co-ordinate before transmission.

RS-232 hardware never leaves a zero voltage on the wire, so the sender and receiver must agree on the length of time the voltage will be held for each bit. In order for the receiver to distingush between an idle line and a 1 bit, the sender transmits a zero before transmitting the bits of a character; this is called the start bit and is illustrated in Figure 2.

Using RS-232
Figure 2: Using RS-232

The sender must leave the line idle for a minimum time; this is usually the time to transmit one bit and is called the stop bit (the standard allows one or two stop bits). Although Figure 2 shows seven data bits, all modern systems transmit eight bits (plus the start and stop bits).

Baud Rate, Bit Rate

Instead of specifying the time per bit (which is a fraction of a second), communication systems specify the number of bits that can be transferred in a second. Early RS-232 connections operated at 300 bps, modern systems use 19,200 bps and 33,600 bps.

Technically, transmission hardware is rated in baud, the number of signal changes per second. For RS-232, the baud rate is identical to the bit rate. Later, we shall see a scheme where the bit rate is greater than the baud rate.

Full-duplex Asynchronous Communication

All electrical circuits require a minimum of two wires - the current flows out on one wire and back on another called the ground. In many applications, we require data to flow in two directions at the same time, e.g. between a terminal and a computer. Simultaneous transfer in two directions is called full-duplex, as distinguished from half-duplex (one direction or the other, but not at the same time) and simplex (one direction only).

RS-232 defines a 25-pin connector and specifies how the hardware uses the 25 wires for control or data. For example, a receiver willing to accept characters supplies a voltage on one of the control lines that the sender interprets as clear to send (CTS). Cheap RS-232 hardware can be configured to ignore control signals and assume the other end is working. This is illustrated in Figure 3.

Full-duplex RS-232
Figure 3: Full-duplex RS-232

A computer transmits on pin 2 and receives on pin 3, while a modem transmits on pin 3 and receives on pin 2. Technically, the computer is a piece of Data Communication Equipment (DCE) and the modem is a piece of Data Terminal Equipment (DTE).

Hardware Limitations

Our earlier waveform diagram shows the ideal case. In practice all electronic devices are analogue in nature and cannot produce an exact voltage or change from one voltage to another instantly. In addition, as electric current flows down a wire, the signal loses strength. Figure 4 illustrates how a bit might appear on a real communication line.

Real vs ideal voltages
Figure 4: Real vs ideal voltages

RS-232 recognises that real hardware is imperfect. The standard specifies how close to a perfect waveform a transmitter must be and how tolerant of imperfection a receiver must be. For example, the standard recommends taking samples during the middle of the time allocated to one bit, allowing it to accept signals like the one in Figure 4.

Hardware Bandwidth

Each transmission system has a limited bandwidth, which is the maximum rate that the hardware can change the signal. If a sender tries to transmit changes faster than the bandwidth, the hardware will not keep up and some changes will be lost. Bandwidth is measured in cycles per second or Hertz (Hz) and is the fastest oscillating signal that can be sent across the hardware.

Nyquist's famous theorem ( [Comer 2004] , p.62) relates the data rate D in bits per second (bps) to the bandwidth B of the transmitted signal in Hz, where K is the number of discrete signal levels.

D = 2 B log2 K

Figure 5: Nyquist's theorem

Nyquist's theorem provides a theoretical maximum that cannot be achieved in practice. Current telephone systems filter out frequencies below 300 Hz (so as not to pick up hum at 50 Hz or 60 Hz caused by electrical equipment in the telephone network) and above 3,400 Hz (bandwidth is expensive :-), yielding a bandwidth of 3,100 Hz. Thus for a binary signal (K = 2), the theoretical maximum speed we can expect through a modem is 6,200 bps. Distortion lowers this to a more practical value of 2,400 bps.

On an ancient V.21, 300 bps, full-duplex modem the originator modem uses the frequency 980 Hz to represent a mark (1) and 1,180 Hz to represent a space (0). The answering modem transmits with 1,650 Hz for a mark and 1,850 Hz for a space, allowing both modems to communicate at the same time ( [Buchanan 2000] , p.139). Modern modems use multi-level signalling to achieve much faster speeds, e.g. 56 kbps.

Different technologies offer higher data rates, e.g. Ethernet (10 Mbps) and Gigabit Ethernet (1 Gbps). Some technologies are surprising. Consider the data rate of a lorry (truck) load of Compact Disks.

This yields a data rate of 192 Gbps! The problem is a latency of 8 hours! If the CDs contain binary data, the bandwidth of the lorry is 91 GHz, equivalent to the electromagnetic spectrum from the telephone service, through coaxial cable and AM radio, to FM radio and TV.

References

  1. William Buchanan, Distributed Systems and Networks, McGraw-Hill Publishing Company, Maidenhead, England, 2000, ISBN 0-07-709583-9.
  2. Douglas Comer, Computer Networks and Internets with Internet Applications (fourth edition), Prentice Hall, Upper Saddle River, NJ, 2004, ISBN 0-13-143351-2. http://netbook.cs.purdue.edu
  3. Douglas Comer, Computer Networks and Internets with Internet Applications (fourth edition), Prentice Hall, Upper Saddle River, NJ, 2004, ISBN 0-13-143351-2. http://netbook.cs.purdue.edu


Last modified: Thu Oct 27 15:56:48 2005