< Day Day Up > |
The serial port , also known as RS-232 or COM (communication) ports (see Figure 8.4), historically has rivaled the parallel port in versatility. Serial ports have been used to connect
Figure 8.4. A 9-pin serial port (DB-9M connector, top) and a 25-pin serial port (DB-25M connector, bottom) on a typical extension bracket from an ISA multi-I/O card. The ribbon cables used to connect the ports to the card can be seen in the background.
How do serial ports compare in speed with parallel ports? Serial ports transmit data one bit at a time (parallel ports send and receive data eight bits at a time), and their maximum speeds are far lower than parallel ports. However, serial cables can carry data reliably at far greater distances than parallel cables. Serial ports, unlike parallel ports, have no provision for daisy-chaining; only one device can be connected to a serial port. It's no wonder that a lot of devices that formerly plugged into the serial port are now calling the USB port "home port." Serial ports come in two forms:
Either type can be adapted to the other connector type with a low-cost adapter (see Figure 8.5). The difference is possible because serial communications need only a few wires. Unlike parallel printers, which use a standard cable, each type of serial device uses a specially wired cable. DB-9M connectors are used on all but the oldest systems. Figure 8.5. A typical DB-25F to DB-9M serial port converter. The DB-25F connector (lower left) connects to the 25-pin serial port and converts its signals for use by devices attaching to the DB-9M port at the other end (upper right).
Serial Port PinoutsAt a minimum, a serial cable must use at least three wires, plus ground:
Tables 8.3 and 8.4 can be used to determine the correct pinout for any specified serial cable configuration. Unlike parallel devices, which all use the same standard cable wiring, serial devices use differently wired cables. A modem cable, for example, will be wired much differently than a serial printer cable. And different serial printers might each use a unique pinout. Table 8.3. 9-Pin Serial Port Pinout
Table 8.4 lists the pinouts for the 25-pin connector; unused pins are omitted. Table 8.4. 25-Pin Serial Port Pinout
When a 9-pin to 25-pin serial port adapter is used (see Figure 8.5), the pins are converted to the more common 25-pin connector (see Table 8.5). Table 8.5. 9-Pin to 25-Pin Serial Port Converter/Serial Modem Pinout
Serial ports assume that one end of the connection transmits and the other end receives. Types of Serial CablesSerial cables, unlike parallel cables, can be constructed in many different ways. In fact, cables for serial devices are usually specified by device type rather than port type. This is because different devices use different pinouts. Some of the most common examples of serial cables include
A null-modem cable enables two computers to communicate directly with each other by crossing the receive and transmit wires (meaning that two computers can send and receive data, much like a computer network, though much slower). The best known of these programs is LapLink, but the Microsoft MS-DOS Interlink and Windows Direct Cable Connection/Direct Serial Connection utilities can also use this type of cable. Although these programs support serial cable transfers, parallel port transfers are much faster and are recommended with MS-DOS and most versions of Windows. However, Windows NT 4.0 and earlier do not support using the parallel port for file transfers, so you must use a null-modem cable such as the one shown in Figure 8.6. Figure 8.6. A LapLink serial cable with connectors for either 25-pin or 9-pin serial ports. Only three wires are needed, enabling the cable to be much thinner than the 9-pin serial extension cable also shown.
A modem cable is used to connect an external modem to a serial port. Some modems include a built-in cable, but others require you to use a DB-9F to DB-25M cable from the 9-pin connector on the serial port to the 25-pin port on the modem. This cable typically uses the same pinout shown in Table 8.5. What about serial printers? These printers are used primarily with older terminals rather than with PCs, and because different printers use different pinouts, their cables must be custom made. In fact, I've built a few myself . Fortunately, most recent terminals use parallel printers. Standard IRQ and I/O Port AddressesSerial ports require two hardware resources: IRQ and I/O port address. Table 8.6 lists the standard IRQ and I/O port addresses used for COM ports 14. Some systems and add-on cards enable alternative IRQs to be used. Table 8.6. Standard Settings for COM (Serial) Ports 14
Note that serial ports never require a DMA channel (and thus can't have DMA conflicts with other devices). However, there's another way to stumble when working with serial ports: IRQ conflicts. IRQ 4 is shared by default between COM 1 and COM 3 ; IRQ 3 is shared by default between COM 2 and COM 4 . However, with ISA serial ports (including those on the motherboard), sharing does not mean that both serial ports can be used at the same time. If a device on COM 1 and a device on COM 3 that share the same IRQ are used at the same time, both devices will stop working and they might shut down the system. The most common situation that causes such a conflict is the use of a mouse connected to COM 1 and a modem connected to COM 3. Use the modem, and the mouse quits working (and so does Windows). As you saw in Chapter 2, "PC Anatomy 101," this happens because computers are interrupt driven ; they use IRQs to determine which device needs to be listened to. When one device (the mouse) is already using the IRQ, the other device (the modem) gets a busy signal. tip
Just as the only solution to busy signals is a second phone line, the preferred solution to IRQ conflicts is to move the second device using an ISA IRQ to a different IRQ. Your ability to do this depends on the serial port. How to Configure or Disable Serial PortsDepending on the location of the serial port, there are several ways to configure the port settings to select different IRQ and I/O port addresses for a serial port, or to disable the serial port. These include
To adjust the configuration of a serial port built into the system's motherboard
To adjust the configuration of an old-school serial port on an I/O card that uses jumper blocks or DIP switches
Many recent systems will display the new port or new configuration during the initial bootup process.
To adjust the configuration of a serial port using a configuration program, start the configuration program, select the serial port, select the IRQ and I/O port address desired or select the Disable Port option, save the changes, and exit. Serial ports on PCI cards are configured by the PnP BIOS. In some cases, you can use the Windows Device Manager to change the port configuration (see Chapter 19 for details). Serial Port Software ConfigurationUnlike parallel ports, serial ports have many different configuration options, making successful setup more challenging. Through software settings at the computer end, and by hardware or software settings at the device end, serial devices can use
Although simple devices such as a mouse or a label printer don't require that these settings be made manually (the software drivers do it), serial printers used with PCs running terminal-emulation software, PCs communicating with mainframe computers, serial pen plotters, serial printers, and PCs using modems often do require that these options be set correctly. Both ends of a serial connection must have these configurations set to identical values, or the communications between your computer and the other device will fail. Figure 8.8 illustrates how Windows XP configures the port speed, flow control, and hardware settings for a serial port connected to an external modem. Figure 8.8. General (left) and Advanced (right) dialog boxes used in Windows XP to configure a serial port connected to an external modem.
Serial Port UARTsAll serial ports are connected to a UART (Universal Asynchronous Receive Transmit ) chip or a multifunction chip that emulates a UART. The UART chip is the "heart" of the serial port because it does the actual transmitting and receiving of data. If you've ever wondered why some serial ports are faster than others, the UART chips used by the serial ports may be the most likely reason. Problems with serial ports that cannot run fast enough to reliably receive and transmit to a particular device, or are unable to run in a multitasking environment such as Windows, can often be traced back to an obsolete UART chip. There are several major types of UART chips:
You can use the Windows 9x/Me (but not Windows 2000/XP) Modem Diagnostics to determine the UARTs installed in a system. Follow this procedure:
In such cases, you can replace obsolete UARTs by disabling the existing serial ports (see "How to Configure or Disable Serial Ports," earlier in this chapter), and then add a faster serial port card containing a fast UART. Systems built since the late 1990s (such as those running Windows 2000 or Windows XP) already have 16550A or faster UARTs (or equivalents) installed so you don't need to worry about having outdated UARTs installed. Don't like the UART in your system? If a system or I/O card uses a socketed 16450 chip, you can replace it with a 16550A or better chip to upgrade the UART. However, most recent computers and I/O cards use a Super I/O chip that contains a UART equivalent and LPT port inside a custom chip, rather than using a standard UART chip. Some recent motherboards don't even have a separate Super I/O chip; the South Bridge chip on the motherboard contains the Super I/O features plus ATA/IDE ports, USB ports, and other functions. To upgrade these systems, disable the serial port function in the system BIOS and install a serial or multi-I/O card that uses a faster UART. Virtually all serial or multi-I/O cards on the market today use 16550A or faster UARTs or UART equivalents. Adding Additional Serial PortsYou can add additional serial ports to a system with any of the following:
Install a PCI card in a PCI slot and an ISA card in an ISA slot. ISA cards that are not PnP should be manually configured to use available IRQ, I/O port address, and DMA channel resources. Use the Windows Device Manager to determine available resource settings (see Chapter 19 for details). A USB-to-serial-port adapter has a USB Type A connection at one end and a 9-pin serial port at the other end. This adapter enables you to connect a serial device to your USB port so you can use the serial port for other devices. |
< Day Day Up > |