THE DIFFERENT KINDS OF CONNECTION

Early personal computers could only connect to the outside world in two ways -- serial ports and parallel ports . Typically, you have two serial ports and one parallel port. The communication possibilities have greatly increased, but these two standbys are standard and are found on practically every personal computer.

These days, your computer can have many connections to the outside world, and many computing jobs deal with getting computers to communicate. Naturally, connecting via the Internet is a big deal, but you may also have to deal with connecting to resources, such as databases, on a local network.

Serial Ports

As you'll recall from Lesson 6, modern computers use the byte composed of 8 bits as a basic unit of memory. Computer peripherals such as printers, modems, and scanners also work with an 8-bit byte. A serial port works by sending the bits contained in a byte one at a time, represented by changing voltage levels. Serial ports are used wherever you want to keep the total number of wires to a minimum, and the number of connectors and cables small and inexpensive. Serial cables have nine or fewer wires; two wires are used for transmitting and receiving data, and the others are used for control functions.

Before it became standard for personal computers to have built-in modems, a typical use for a serial port was to connect to a modem. Other devices typically connected to serial ports include scanners, PDA (personal digital assistants) synchronization cradles, and printers.

By convention, serial ports are named COM1, COM2, and so on. These ports are characterized by the rate at which data is transmitted in terms of bits per second, plus some other parameters not covered in this lesson. A top speed of over 100,000 bits per second is common. This translates to over 10,000 bytes per second; however, many devices can't communicate that fast.

Most programming languages provide for sending and receiving data on COM ports. Typically, a language enables you to set the transmission speed, and send or receive one 8-bit byte at a time. Currently, the only programmers dealing with serial ports directly are those experimenting with digital circuitry.

Parallel Ports

Parallel ports achieve a high rate of data transmission by sending all 8 bits of a byte in parallel (8 bits equals eight wires) at a time. With the eight wires needed for reading data plus the control signals, you end up with a 25-pin plug as well as an expensive and thick wire. Because the most common use for parallel ports has been for communicating with printers, the conventional port name is LPT1 (line printer). Modern GUI operating systems such as Windows take over printing functions, so only more advanced languages enable you to talk directly to LPT1.

If you want to see the serial and parallel ports your computer supports, you can do this from the Control Panel on a Windows machine. Choose Start > Settings > Control Panel , double-click the System icon, select the Hardware tab, and then choose the Device Manager . Look for a Ports listing. (The steps may be a little different depending on your version of Windows.)

Newer Serial Devices

The hardware limitations of the original IBM PC COM ports are too restrictive now that users have dozens of potential accessories that can be attached to a personal computer. High-speed serial interfaces that use only a few wires have replaced COM port connections in modern machines. This is all part of the trend to cut the cost and bulk of connectors and wires as computers have gotten more compact.

If your computer was purchased in the last few years, you probably have a USB (Universal Serial Bus) or Firewire connector on your system. With these standards, connectors can communicate with many devices. Unfortunately, the protocols for communicating on these newer serial ports are so complex that programming languages don't provide easy access.

A protocol is a set of rules describing how data is transmitted. Through a determined effort by professional societies and manufacturers, standardization on a few protocols makes standard cable connectors and modern networking possible.