Traditionally, the most basic communication ports in any PC system have been the serial and parallel ports; however, these ports are quickly
Serial ports (also known as
ports) were originally used for devices that had to communicate bidirectionally with the system. Such devices include modems, mice,
Several companies manufacture communications programs that perform high-speed transfers between notebook PC systems using serial or parallel ports. Versions of these file-transfer programs have been included with DOS 6.0 and higher (Interlink) and with Windows 95 and newer versions (DCCDirect Cable Connection). Currently,
The asynchronous serial interface was designed as a system-to-system communications port.
means that no synchronization or clocking signal is present, so
Each character that is sent over a serial connection is framed by a standard start-and-stop signal. A single 0 bit, called the
, precedes each character to tell the receiving system that the
refers to data that is sent over a single wire, with each bit
Typical Locations for Serial Ports
Typical laptop systems include one serial port, with the connector located normally at the rear of the system. Built-in serial ports are controlled by either a Super I/O chip on the motherboard or a highly integrated South Bridge chip in the latest motherboard designs.
If you need more serial ports than your system has as standard, or if your notebook did not include a serial port at all, you can purchase single-port or multiport serial port PC Cards.
Note that PC Cardbased modems also
Figure 8.12. Modern (AT-style) 9-pin serial port connector specifications.
Figure 8.13 shows the original standard 25-pin version.
Figure 8.13. Original 25-pin serial port connector specifications.
Serial ports can connect to a variety of devices, such as modems,
The official specification recommends a maximum cable length of 50 feet. The limiting factor is the total load capacitance of cable and input circuits of the interface. The maximum capacitance is specified as 2,500pF (picofarads). Special low-
Tables 8.10, 8.11, and 8.12 show the pinouts of the 9-pin serial connector, the 25-pin serial connector, and the 9-pin-to-25-pin serial adapter, respectively.
Table 8.10. 9-Pin Serial Port Connector
Table 8.11. 25-Pin Serial Port Connector
Table 8.12. 9-Pin-to-25-Pin Serial Adapter Connections
The heart of any serial port is the Universal Asynchronous Receiver/Transmitter (UART) chip. This chip completely controls the process of breaking the native parallel data within the PC into serial format and later converting serial data back into the parallel format.
Several types of UART chips have been available on the market. The 16550 UART includes a 16-byte buffer that aids in faster communications. This is sometimes referred to as a FIFO (First In First Out) buffer.
Even though virtually all Pentium-class and newer systems have 16550-equivalent UART functionality in their serial ports, any search for a socketed 16550 chip on most of these systems would be done in vain. Instead, the functionality of the 16550, parallel port, and other ports is included as part of the Super I/O chip or, on the newest systems, the South Bridge chip.
Another way to tell whether you have a 16650 UART in Windows is to click the Start menu and then select Settings, Control Panel. Next, double-click Modems and then click the Diagnostics tab. The Diagnostics tab shows a list of all COM ports in the system, even if they don't have a modem attached to them. Select the port you want to check in the list and click More Info. Windows communicates with the port to determine the UART type, and that information is listed in the Port Information portion of the More
Onboard Serial Ports
Starting with late-model 486-based systems in the mid-1990s, a component on the motherboard called a
Many of the newer systems have become legacy free , which means they don't include a Super I/O chip or any of the functions found on them, such as serial ports.
Serial Port Configuration
Each time a serial port receives a character, it has to get the attention of the computer by raising an interrupt request line (IRQ). Eight-bit ISA bus systems have eight of these lines, and systems with a 16-bit ISA bus have 16 lines. The 8259 interrupt controller chip or equivalent usually handles these
When a serial port is installed in a system, it must be configured to use specific I/O addresses (called ports ) and interrupts (called IRQs ). The best plan is to follow the existing standards for how these devices are to be set up. For configuring serial ports, use the addresses and interrupts indicated in Table 8.13.
Table 8.13. Standard Serial I/O Port Addresses and Interrupts
If you are adding more than the standard COM1 and COM2 serial ports, be sure they use unique and nonconflicting interrupts. If you purchase a serial port adapter card and intend to use it to supply ports beyond the standard COM1 and COM2, be sure it can use interrupts other than IRQ3 and IRQ4; the latest CardBus-based serial port cards take advantage of IRQ-sharing features to allow COM3 and above to use a single IRQ without conflicts.
Note that BIOS manufacturers never built support for COM3 and COM4 into the BIOS. Therefore, DOS cannot work with serial ports above COM2 because DOS gets its I/O information from the BIOS. The BIOS finds out what is installed in your system, and where it is installed, during the POST (Power On Self Test). The POST checks only for the first two installed ports. This is not a problem under Windows because Windows 95 and later has built-in support for up to 128 ports.
Testing Serial Ports
You can perform several tests on serial and parallel ports. The two most common types of tests are those that involve software only and those that involve both hardware and software. The
See "Testing Parallel Ports," p. 303 (this chapter).
See "Advanced Diagnostics Using Loopback Testing," p. 294 (this chapter).
Microsoft Diagnostics (MSD) is a diagnostic program supplied with MS-DOS 6.x, Windows 3.x, and Windows 9x/Me/2000. Note that with Windows 95, this program can be found on the CD-ROM in the \other\msd directory. In Windows 98/Me/2000, you can find it on the CD-ROM in the \tools\oldmsdos directory. MSD is not automatically installed when you install the operating system. To use it, you must run it from the CD-ROM directly or copy the program from the CD-ROM to your hard disk.
For the most accurate results, many diagnostics programs, such as MSD, are best run in a DOS-only environment. Because of this, you need to restart the machine in DOS mode before using them. Then, to use MSD, switch to the directory in which it is located. This is not necessary, of course, if the directory that contains the program is in your search
Select the Serial Ports option. Notice that you are given information about which type of serial chip you have in your system, as well as information about which ports are available. If any of the ports are in use (with a mouse, for example), that information is provided as well.
MSD is helpful in at least determining whether your serial ports are responding. If MSD cannot determine the existence of a port, it does not provide the report that indicates that the port exists. This
Troubleshooting Ports in Windows
Windows 9x/Me can tell you whether your ports are functioning. First, you must verify that the required communications files are present to support the serial ports in your system:
The SERIAL.VXD driver is not loaded in SYSTEM.INI ; instead, it is loaded through the Registry.
Windows 2000 and XP use the SERIAL.SYS and SERENUM.SYS drivers for handling RS-232 devices. You can compare the file sizes and dates for these files to those on the Windows 2000 CD-ROM.
If both drivers are present and accounted for, you can determine whether a particular serial port's I/O address and IRQ settings are properly defined by following these steps for Windows 9x/Me/2000:
A common problem with nonPlug and Play modems can occur when people try to use a modem on COM3 with a serial mouse or other device on COM1. Normally, COM1 and COM3 ports use the same IRQ, meaning that they cannot be used
Advanced Diagnostics Using Loopback Testing
One of the most useful types of diagnostic test is the loopback test, which can be used to ensure the correct function of the serial port and any attached cables. Loopback tests are basically internal (digital) or external (analog). You can run internal tests by simply unplugging any cables from the port and executing the test via a diagnostics program.
The external loopback test is more effective. This test requires that a special loopback connector or wrap plug be attached to the port in question. When the test is run, the port is used to send data out to the loopback plug, which simply routes the data back into the port's receive pins so the port is transmitting and receiving at the same time. A loopback or wrap plug is nothing more than a cable that is
Following is a list of the wiring needed to construct your own serial port loopback or wrap plugs:
See "Serial Ports," p. 288 (this chapter).
To make these loopback plugs, you need a connector shell with the required pins installed. Then wire-wrap or solder the wires,
In most cases, purchasing a set of loopback connectors that are
One advantage of using loopback connectors is that you can plug them into the ends of a cable that is included in the test. This can verify that both the cable and the port are working properly.
Parallel ports normally are used for connecting printers to a notebook PC. Even though that was their sole original purpose, parallel ports have become much more useful over the
Parallel ports are so named because they have eight lines for sending all the bits that comprise 1 byte of data simultaneously across eight wires. This interface is fast and traditionally has been used for printers. However, programs that transfer data between systems always have used the parallel port as an option for transmitting data because it can do so 4 bits at a time rather than 1 bit at a time, as with a serial interface.
The following section looks at how these programs transfer data between parallel ports. The only problem with parallel ports is that their cables cannot be extended for any great length without
Table 8.14. 25-Pin PC-Compatible Parallel Port Connector
IEEE 1284 Parallel Port Standard
The IEEE 1284 standard, called Standard Signaling Method for a Bidirectional Parallel Peripheral Interface for Personal Computers , was approved for final release in March 1994. This standard defines the physical characteristics of the parallel port, including data-transfer modes and physical and electrical specifications. IEEE 1284 defines the electrical signaling behavior external to the notebook or desktop PC for a multimodal parallel port that can support 4-bit modes of operation. Not all modes are required by the 1284 specification, and the standard makes some provision for additional modes.
The IEEE 1284 specification is
IEEE 1284 pertains only to hardware and line control and does not define how software is to talk to the port. An offshoot of the original 1284 standard has been created to define the software interface. The IEEE 1284.3 committee was
IEEE 1284 ports and cables enable higher throughput (as compared to noncompliant hardware) in a connection between a computer and a printer or between two computers. The result is that the printer cable is no longer the standard printer cable. The IEEE 1284 printer cable uses twisted-pair technology, which results in a much more reliable and error-free connection.
The IEEE 1284 standard also defines the parallel port connectors, including the two
Figure 8.14. The three different types of IEEE 1284 parallel port connectors.
Most parallel ports use the standard Type A receptacle, as shown in Figure 8.15.
Figure 8.15. Standard Type A parallel port connector.
The IEEE 1284 parallel port standard defines five port-operating modes, emphasizing the higher-speed EPP and ECP modes. Some of the modes are input only, whereas others are output only. These five modes combine to create four types of ports, as shown in Table 8.15.
Table 8.15. Types of IEEE 1284 Ports
The 1284-defined parallel port modes are shown in Table 8.16, which also shows the approximate transfer speeds.
Table 8.16. IEEE 1284 Parallel Port Modes
Each of the port types and modes is discussed in the following sections.
Standard Parallel Ports
Older systems did not have different types of parallel ports available. The only available port was the parallel port that was used to send information from the computer to a device such as a printer. The unidirectional nature of the original PC parallel port is consistent with its primary usethat is, sending data to a printer. There were times, however, when it was desirable to have a bidirectional portfor example, when it was necessary to receive feedback from a printer, which was common with PostScript printers. This could not be done easily with the original unidirectional ports.
Although it was never intended to be used for input, a clever scheme was devised in which four of the signal lines can be used as a 4-bit input connection. Thus, these ports can do 8-bit (byte) output (called compatible mode ) and 4-bit input (called nibble mode ). This is still very common on low-end desktop systems. Systems built after 1993 are likely to have more capable parallel ports, such as bidirectional, EPP, or ECP.
Standard parallel ports are capable of effective transfer rates of about 150KBps output and about 50KBps input.
Bidirectional (8-Bit) Parallel Ports
With the introduction of the PS/2 series of machines in 1987, IBM introduced the bidirectional parallel port. These are commonly found in PC-compatible systems today and can be designated "bidirectional," "PS/2 type," or "extended" parallel ports. This port design opened the way for true communication between the computer and the peripheral across the parallel port. This was done by defining a few of the previously unused pins in the parallel connector, and by defining a status bit to
These ports can do both 8-bit input and output using the standard eight data lines and are considerably faster than the 4-bit ports when used with external devices. Bidirectional ports are capable of approximately 150KBps transfer rates on both output and input. Some newer systems use this as their "standard" mode.
Enhanced Parallel Port
EPP is a newer specification, sometimes referred to as the Fast Mode parallel port. Intel, Xircom, and Zenith Data Systems developed and announced, in October 1991, the EPP. The first products to offer EPP were Zenith Data Systems laptops, Xircom Pocket LAN adapters, and the Intel 82360 SL I/O chip. Currently, almost all systems include a multimode parallel port, usually built in to the Super I/O chip on the motherboard, that supports EPP mode.
EPP operates at almost ISA bus speed and offers a tenfold increase in the raw throughput capability over a conventional parallel port. EPP is
Since the original Intel 82360 SL I/O chip in 1992, other major chip vendors (such as National Semiconductor, SMC, Western Digital, and VLSI) have also produced I/O chipsets that offer some form of EPP capability. One problem is that the procedure for enabling EPP across the various chips
EPP version 1.7 (March 1992) identifies the first popular version of the hardware specification. With minor changes, this has since been
Unfortunately, this has resulted in two somewhat incompatible standards for EPP parallel ports: the original EPP Standards Committee version 1.7 standard and the IEEE 1284 Committee standard, normally called
EPP version 1.9
. The two standards are similar enough that new peripherals can be designed to support both, but older EPP 1.7 peripherals might not
EPP ports are now supported in virtually all Super I/O chips that are used on modern motherboards and in South Bridge chips that integrate I/O functions. Because the EPP port is defined in the IEEE 1284 standard, it also has
Enhanced Capabilities Port
In 1992, Microsoft and Hewlett-Packard announced another type of high-speed parallel port: the Enhanced Capabilities Port (ECP). Similar to EPP, ECP offers improved performance for the parallel port and requires special hardware logic.
Since the original announcement, ECP is included in IEEE 1284just like EPP. Unlike EPP, however, ECP is not tailored to support portable PCs' parallel port peripherals; its purpose is to support an inexpensive attachment to a very high-performance printer or scanner. Furthermore, ECP mode requires the use of a DMA channel, which EPP did not define and which can cause
Most new systems are being delivered with ECP ports that support high-throughput communications. In most cases, the ECP ports can be turned into EPPs or standard parallel ports via BIOS. However, it's recommended that the port be placed in ECP mode for the best throughput.
Depending on the motherboard, the DMA channel assignment used for ECP mode on a built-in parallel port might be performed through the BIOS Setup program or through moving a
Virtually every new or recent system today supports both the EPP and ECP modes of the IEEE 1284 Parallel Port standard. If you want to test the parallel ports in a system, especially to determine which type they are, I highly recommend a utility called Parallel. This is a handy parallel port information utility that examines your system's parallel ports and
High-speed parallel ports such as EPP and ECP often are used for supporting external peripherals, such as Zip drives, CD-ROM drives, scanners, tape drives, and even hard disks. Most of these devices attach to the parallel port using a pass-through connection. This means that your local printer can still work through the port, along with the device. The device will have its own drivers that
Parallel Port Configuration
The configuration of parallel ports is not as complicated as it is for serial ports. Even the original IBM PC had BIOS support for three LPT ports. Table 8.17 shows the standard I/O address and interrupt settings for parallel port use.
Table 8.17. Parallel Interface I/O Port Addresses and Interrupts
Because the BIOS and DOS have always provided three definitions for parallel ports, problems with older systems are infrequent. Problems can arise, however, from the lack of available interrupt-driven ports for ISA/PCI bus systems. Normally, an interrupt-driven port is not
Also, high-speed laser-printer utility programs often use the interrupt capabilities to enable printing. If you use these types of applications on a port that is not interrupt driven, you see the printing slow to a crawlif it works at all. The only solution is to use an interrupt-driven port. Windows supports up to 128 parallel ports.
To configure parallel ports, you normally use the BIOS Setup program for ports that are built in to the motherboard, or you might need to set
Linking Systems with Serial or Parallel Ports
It is possible to connect two systems locally using their serial or parallel ports along with specially wired cables. This form of connection has been used over the years to allow for a quick and easy mini-LAN to be set up that allows for the transfer of data between two systems. This can be especially useful when you are migrating your data to a new system you have built or purchased.
Note that although using serial or parallel ports to connect two systems in order to migrate data can be useful, a much better way to connect two systems would be to use Ethernet cards and what is commonly called a
. Using this type of connection, you can establish a LAN link between the two systems and transfer data at the full speed of the Ethernet network, which is either 10, 100, or 1,000Mbps (1.25, 12.5 or 125MBps). Using serial or parallel ports to transfer data between two systems was more
A number of free and commercial programs can support serial or parallel port file transfers. MS-DOS 6.0 and later include a program called Interlink, whereas Windows 95 and later include software called either Direct Cable Connection or Direct Parallel Connection. Other commercially available software includes Laplink.com's LapLink, SmithMicro's CheckIt Fast Move, and Symantec's PC Anywhere, among others.
Serial Port Transfers
Serial ports have always been used for communications between systems, but normally the ports would be connected to modems that convert the data to be transmitted over telephone lines, enabling long-distance connections. If the systems were in the same room, one could connect the serial ports directly without the use of modems by using instead what is commonly referred to as a
null modem cable
. The name comes from the fact that there really aren't any modems present; the cable effectively
With a null modem cable, serial ports can be used to transfer data between systems, although the performance will be much lower than if parallel ports are used. A serial null modem cable will have either a 9-pin or a 25-pin female connector on both ends. The cable should be wired as shown in Table 8.18.
Table 8.18. Serial Null Modem Cable Wiring (9-Pin or 25-Pin Connectors)
If both systems feature infrared serial ports, you can connect the two systems together via an infrared connection that uses no cable at all. This type of connection is subject to the limitations of the infrared ports, which will only allow very short (a few feet at most) distances with
Because they work so slowly, normally I would recommend using serial ports only as a last resort to transfer data between two systems. If possible, you should try to use Ethernet cards and a crossover cable, or parallel ports with an interlink cable, for faster connections.
Parallel Port Transfers
Although the original
Connecting two computers with parallel ports requires a special cable known as either a Direct Cable Connection (DCC), Interlink, Laplink, parallel crossover , or parallel null modem cable. Many of the commercial file-transfer programs provide these cables with their software, or you can purchase them separately from most computer stores or companies that sell cables. However, if you need to make one for yourself, Table 8.19 provides the wiring diagram you need.
Table 8.19. Direct Cable Connection (DCC)/Interlink, LapLink, or Parallel Null Modem Cable Wiring (25-Pin Connectors)
Even though cables usually are provided with data-transfer programs, notebook users might want to look for an adapter that makes the appropriate changes to a standard parallel printer cable. This can make traveling lighter by preventing the need for additional cables.
Although the prebuilt parallel cables referred to in the previous tip work for connecting two machines with ECP/EPP ports, they can't take advantage of the advanced transfer rates of these ports. Special cables are needed to communicate between ECP/EPP ports. Parallel Technologies is a company that sells ECP/EPP cables for connecting to other ECP/EPP computers, as well as a universal cable for connecting any two parallel ports to use the highest speed.
Windows 95 and later versions include a special program called Direct Cable Connection (DCC) or Direct Parallel Connection , which enables two systems to be networked together via a parallel transfer cable. Consult the Windows documentation for information on how to establish a DCC/Direct Parallel connection. Parallel Technologies has been contracted by Microsoft to supply the special DCC cables used to connect the systems, including a special type of cable that uses active electronics to ensure a reliable high-speed interconnection.
Parallel ports can also be used to connect SCSI peripherals to a PC. With a parallel-to-SCSI converter, you can connect any type of SCSI devicesuch as hard disks, CD-ROM drives, tape drives, Zip drives, or scannersto your PC, all via the parallel port. To connect to a SCSI device and also continue to be able to print, most parallel-to-SCSI converters include a pass-through connection for a printer.
This means that at one end of the converter is a connection to your parallel port, and at the other end is both SCSI and parallel port connections. Thus, you can plug in a single SCSI device and still connect your printer as well. The drivers for the parallel-to-SCSI converter automatically pass through any information to the printer, so the printer works normally.
Adaptec is the major supplier of such converters, but they are available from other companies as well. Note that these converters are designed to handle a single SCSI device; you should buy a SCSI host adapter card if you need to support two or more devices. Also note that even an EPP/ECP parallel port runs at only a fraction of the speed (2MBps) of even the slowest SCSI device (10MBps and up).
Testing Parallel Ports
The procedures for testing parallel ports are effectively the same as those used for serial ports, except that when you use the diagnostics software, you obviously select choices for parallel ports rather than serial ports.
Even though the software tests are similar, the hardware tests require the proper plugs for the loopback tests on the parallel port. Several loopback plugs are required, depending on what software you are using. Most use the IBM-style loopback, but some use the style that originated in the Norton Utilities diagnostics.
You can purchase loopback plugs or build them yourself. The following wiring is needed to construct your own parallel loopback or wrap plugs to test a parallel port: