|
|
< Day Day Up > |
|
Hack 77 Break the Rules with COM Ports
Allow more than two COM ports to work simultaneously without conflicts. We don't seem to use COM ports very much these days, but even new USB-connected devices emulate the tried-and-true methods of serial communications in today's technology. The plain old serial port is still imperative for communicating with most of the devices that make the Internet possible: modems, routers, switches, and headless servers. In the design of the original PC, IBM created a deliberate conflict between COM ports that has never been resolved through any change of standards or design. The conflict is the IRQ assignments for COM1 and COM3, which both use IRQ4, and COM2 and COM4, which both use COM3. Apparently IBM never thought anyone would want to use more than two COM ports at the same time: you cannot use COM1 and COM3 at the same time, nor COM2 and COM4 at the same time. This conflict came to light as early online pioneers started running bulletin board systems with multiple modems to allow multiple users access at the same time. Early communications software relied on the system BIOS for many hardware I/O functions, and serial communications was one of them. The BIOS, of course, was hard-coded to adhere to strict rules, and COM port configuration and IRQs were encompassed by them. As time passed, developers determined the BIOS functions were not the only or best way to get the hardware to do what they wanted. Flexibility in software and hardware configurations came about to the advantage of users. They could work around the limitations of the BIOS by addressing system hardware directly, which worked well if it was certain that other hardware and software were not going to get in the way. The first thing that got in the way of expanding the communications capabilities of the PC was the COM-port IRQ conflict. The conflict could only be resolved through some clever hacking of software and hardware to make things work. Software programmers had to know and provide for the many different addresses and IRQs that were likely to be available in the PC, and hardware makers or technically inclined users had to know how to get the hardware configured to their advantage. Since the source of conflict with using multiple COM ports at the same time is the lack of a unique IRQ for each port, you need to scrounge for two more IRQ lines to give the COM3 and COM4 ports their own IRQs.
Recovering an unused IRQ or two from one or more LPT ports [Hack #76] can be a rather fortunate coincidence. You can usually repurpose IRQ7 for one of the four COM ports. You may be able to repurpose IRQ5 as well, if a sound card or another device has not laid claim to it. With only IRQ 5, 9, 10, and 11 to choose from, you face another dilemma; most serial/COM port add-in cards use the 8-bit ISA bus form factor and thus lack any electrical connection or access to IRQs 8-15. This forces you to use IRQ5 for the fourth COM port expansion, which forces you to use a 16-bit ISA or a PCI-bus sound card. Once you have determined that IRQs 5 and 7 are the only ones suitable and available to an 8-bit ISA serial/COM port expansion board, buy an expansion board that has jumpers or switches you can use to select these alternate IRQs, like the one shown in Figure 8-2. Figure 8-2. A new COM port card with jumpers to set optional IRQs![]() The card shown in Figure 8-2 is available from Startech.com as part number ISA2S550 and provides an extended connection into a 16-bit ISA slot to pick up IRQs 9, 10, 11, 12, and 15. Startech also offers PCI-based serial I/O and many other hard-to-find cards for many different types of PC expansion. Follow these steps to reconfigure address or IRQ settings in Windows to match the actual COM port device you are using—a physical port or a virtual one such as a USB-to-serial adapter:
|
|
|
< Day Day Up > |
|