Next Previous Contents

4. Is the Serial Port Obsolete?

4.1 Introduction

The answer is yes, but ... The serial port is somewhat obsolete but it's still needed, especially for Linux. The serial port has many shortcomings but almost all new PC's seem to come with them. Linux supports ordinary telephone modems only if they work thru a serial port (although the port may be built into the modem).

The serial port must pass data between the computer and the external cable. Thus it has two interfaces: the serial-port-to cable and the serial-port-to-computer-bus. Both of these interfaces are slow. First we'll consider the interface via external cable to the outside world.

4.2 EIA-232 Cable Is Low Speed & Short Distance

The conventional EIA-232 serial port is inherently low speed and is severely limited in distance. Ads often read "high speed" but it can only work at "high speed" over very short distances such as to a modem located right next to the computer. Compared to a network card, even this "high speed" is actually low speed. All of the EIA-232 serial cable wires use a common ground return wire so that twisted-pair technology (needed for high speeds) can't be used without additional hardware. More modern interfaces for serial ports exist but they are not standard on PC's like the EIA-232 is. See Successors to EIA-232. Some multiport serial cards support them.

It is somewhat tragic that the RS-232 standard from 1969 did not use twisted pair technology which could operate about a hundred times faster. Twisted pairs have been used in telephone cables since the late 1800's. In 1888 (over 110 years ago) the "Cable Conference" reported its support of twisted-pair (for telephone systems) and pointed out its advantages. But over 80 years after this approval by the "Cable Conference", RS-232 failed to utilize it. Since RS-232 was originally designed for connecting a terminal to a low speed modem located nearby, the need for high speed and longer distance transmission was apparently not recognized.

4.3 Inefficient Interface to the Computer

To communicate with the computer, any I/O device needs to have an address so that the computer can write to it and read from it. For this purpose many I/O devices (such as serial ports) use a special type of address known as an I/O addresses (sometimes called an I/O port). The I/O address of a certain device (such as ttys/2) will be a range of addresses. The lower address in this range is the base address. "address" usually means just the "base address".

Instead of using I/O addresses, some I/O devices read and write directly from/to main memory. This provides more bandwidth since the conventional serial I/O system only moves a byte at a time. There are various ways to read/write directly to main memory. One way is called shared memory I/O (where the shared memory is usually on the same card as the I/O device). Other methods are DMA (direct memory access) on the PCI or ISA bus. Strictly speaking, for the PCI bus this is "bus mastering" and not DMA but it's like DMA and a lot faster than true DMA on the old ISA bus.

DMA is a lot faster than the serial-port-to computer-bus interface. Also, the computer bus is capable of 4 (or 8) byte transfers but the serial port only transfers a byte at a time. Interrupts to initiate a series of such single-byte transfers often happen only every 14 bytes.


Next Previous Contents