22.4 Installing and Configuring Serial Port Hardware
Before you buy a serial port, verify that you don't already have what you need. Serial ports are cheap, ubiquitous, and easily disabled, so you may already have one or more of them installed that you don't know about. Before you purchase a serial port expansion card, take the following steps:
If you do need to buy a serial port card, get a dual-16650 card. These are available from numerous vendors for $25 or so. Dual-16550 cards are still available, sometimes for under $15, but having the 16650s is worth the small additional cost. If possible, buy a PCI card rather than an ISA one. Serial ports are too slow to really need PCI, but you should avoid installing ISA cards in a PCI system whenever possible.
Once the port is physically installed and enabled, the next step is to configure the port hardware by assigning an IRQ and base address to the port. This is done differently according to the port being installed, as follows:
If you need only one or two serial ports, configure them with standard settings for COM1 and/or COM2. If you need more than two, configure the least flexible serial ports as COM1 and COM2 and use the ports that allow custom IRQ and base address settings for COM3 and above. Assign the standard ports 0x3E8 to COM3 and 0x2E8 to COM4, but assign unused IRQs to those ports. For example, you might configure COM3 for 0x3E8 and IRQ 10 (rather than the default IRQ 4). Doing so allows you to use all COM ports simultaneously with no risk of IRQ conflicts.
22.4.1 Configuring COM Port Settings
Once you have installed and configured the serial port hardware, the next step is to configure the operating system to use it. Windows automatically recognizes proper IRQ and base address values for serial ports reported by the BIOS that use standard BIOS settings COM1 and COM2 in this example. Depending on the BIOS, nonstandard COM port assignments are often detected, but the hardware settings may not be reported correctly. For example, when we installed COM3 on an older system using 0x3E8 and IRQ 10, Windows 95 detected COM3 on 0x3E8, but assumed that it used IRQ 4.
18.104.22.168 Configuring COM Port Settings in Windows 9X
To configure COM port settings in Windows 9X, right-click the My Computer icon and choose Properties to display Device Manager. If necessary, mark the View devices by type option button. Expand the Ports (COM and LPT) item, and double-click the port you are configuring to display the port Properties dialog. The General page, shown in Figure 22-5, reports port status (in this case the port is working properly) and whether or not the port is available for use in the current profile.
Figure 22-5. The General page displays the operational status of the port
Click the Port Settings tab to display the Port Settings page, shown in Figure 22-6, and use the drop-down lists to configure port defaults for speed, framing, and flow control.
Figure 22-6. Use the Port Settings page to configure communication parameters for the port
Windows automatically detects and enables 16550 FIFO buffering by default, but may use overly conservative settings. To optimize port performance, click the Advanced button in Port Properties to display the Advanced Port Settings dialog, shown in Figure 22-7. Move both slider bars to the far right for fastest performance, and leave them there unless you have problems with the port.
Figure 22-7. Use Advanced Port Settings to configure UART settings
To modify IRQ and/or I/O port settings, display the Resources page, shown in Figure 22-8. Clear the Use automatic settings checkbox, and select one of the Basic Configurations shown in Table 22-11. Highlight Input/Output Range or IRQ and click Change Setting. Select an available I/O port or IRQ, making sure that the conflict information pane indicates that no conflicts exist. Save the changes and restart the system.
Figure 22-8. The Resources page in Windows 98SE displays automatic settings for COM1
Table 22-11 lists Windows 98 (not Windows 98SE) Basic Configurations for COM ports. Basic Configurations 0, 2, 4, and 6 define standard uneditable values for COM1 through COM4 respectively. Basic Configurations 1, 3, 5, and 7 assign standard settings for I/O port, but allow you to modify the IRQ. Choosing Basic Configuration 8 allows you to assign any IRQ and I/O port to a COM port.
Table 22-12 and Table 22-13 list Windows 98SE (not Windows 98) Basic Configurations for COM ports 1 and 2, respectively. In each case, Basic Configuration 0000 uses the most common settings for that port, and allows editing neither IRQ nor I/O port. Basic Configurations 0001 through 0004 allow you to choose a standard I/O port address range and assign any available IRQ to that COM port. The Windows 98SE method differs from that of Windows 98 and Windows 2000 (described in the following section) in that it forces you to choose a predefined I/O Port address range and allows editing only the IRQ assigned to that port.
22.214.171.124 Configuring COM Port Settings in Windows NT 4
To configure port settings in Windows NT, run the Control Panel Ports applet. The Ports dialog lists the COM ports that NT recognizes. Double-click the port to be configured and use the drop-down lists in the Settings dialog, shown in Figure 22-9, to configure default port settings for speed, framing, and flow control.
Figure 22-9. Use the Windows NT 4 Settings dialog to configure communication parameters for the port
To view or change settings for I/O port and IRQ, click the Advanced button in the Settings dialog and use the drop-down lists to specify parameters for the port, as shown in Figure 22-10. You can enable or disable FIFO buffering by marking or clearing the checkbox, but Windows NT 4 makes no provision for tuning FIFO performance from the GUI. Although it's probably not worth the time to do, you can modify FIFO buffering settings using the Registry Editor. FIFO settings are contained in the key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Serial. The relevant value entries are:
Figure 22-10. Use the Windows NT 4 Advanced Settings dialog to configure base address and IRQ for a selected comm port
Note the following when you are configuring COM ports under NT:
126.96.36.199 Configuring COM Port Settings in Windows 2000/XP
To configure port settings in Windows 2000/XP, right-click the My Computer icon and choose Properties to display the System Properties dialog. Display the Hardware page and click the Device Manager button. If necessary, mark the View devices by type option button. Expand the Ports (COM and LPT) item, and double-click the port you are configuring to display the port Properties dialog. The General page reports port status and whether or not the port is available for use in the current profile. The Port Settings page, shown in Figure 22-11, allows you to change the default speed and framing parameters for the port.
Figure 22-11. Use the Windows 2000/XP Port Settings dialog to change default speed and framing parameters
Windows 2000/XP automatically detects and enables 16550 FIFO buffering by default, but sets both Receive Buffer and Transmit Buffer to their fastest settings by default. On most systems, these settings work properly. If you encounter frequent retries or corrupted data on the serial port, try using these sliders on the Advanced Settings dialog, shown in Figure 22-12, to reduce the buffer settings in small increments.
Figure 22-12. Adjust the Receive Buffer and Transmit Buffer sliders for optimum performance
To modify IRQ and/or I/O port settings, display the Resources page, shown in Figure 22-13. Clear the Use automatic settings checkbox, and select one of the Basic Configurations shown in Table 22-14 (for COM1) or Table 22-15 (for COM2). Highlight Input/Output Range or IRQ and click Change Setting. Select an available I/O port or IRQ, making sure that the conflict information pane indicates that no conflicts exist. Save the changes and restart the system.
Figure 22-13. Windows XP Professional displays automatic settings for COM1
Table 22-14 and Table 22-15 list Windows 2000/XP Basic Configurations for COM ports 1 and 2, respectively. In each case, Basic Configurations 0000 through 0003 define standard settings for the COM ports, with 0000 corresponding to the most common settings. For either port, choosing Basic Configuration 0004 allows you to assign any available IRQ and I/O port to that COM port. The Windows 2000 method is similar to that of Windows 98SE, except that Windows 2000 allows editing both IRQ and I/O port address range in Basic Configuration 0004, whereas Windows 98SE forces you to select from among the listed I/O port address ranges, and allows editing only the IRQ assigned to the port.
On some i440BX-based systems and perhaps systems with other chipsets as well, although we have not encountered it Windows 2000/XP refuses to recognize serial ports and parallel ports. From reports we receive from readers, this is apparently not an uncommon problem. The symptom of this problem is that Device Manager displays a yellow exclamation point for the port(s) in question. Double-clicking the port displays the device status information shown in Figure 22-14.
Figure 22-14. Windows displays Device status as disabled when it does not recognize a port
According to Microsoft, the message "This device is disabled because the firmware of the device did not give it the required resources. (Code 29)" indicates either that the port is disabled in the BIOS but is still being enumerated, or that the system BIOS needs to be updated. Each time we encounter this problem, updating the system BIOS to the most recent version indeed fixes the problem.