Resolving IRQ and COM Port
Conflicts
What are IRQ's and COM
Ports?
You can think of the word IRQ
as being an abbreviation for Interrupt Request. An IRQ is a request to the
processor to get the attention needed to interface an device into the system.
The system acknowledges 16 IRQS, numbered 0 through 15. To use certain devices,
the system requires an open IRQ. If two devices try to use the same IRQ, the
system or one of the devices will likely freeze.
COM Ports (short for Communication Ports)
are modular (serial) channels to the system, requiring the use of an IRQ. A COM
Port is an extension of an IRQ to a device that is not plugged directly into the
bus. Examples of devices that utilize COM ports are mice, modems, scanners, and
serial printers. The system will acknowldge up to 4 COM Ports: COM1, COM2, COM3,
and COM4. Each COM port, when in use, requires its own IRQ. You don't need to
enable any COM ports (technically), but typically systems have 2 in use: mouse
(usually on COM1) and modem (Usually on COM2 or COM4). Serial ports end in
either 9-pin or 25-pin connectors which can easily be interconverted.
IRQ Settings
Since the number of available IRQs is limited, they
become a valuable resource. Here is a list of the IRQs and their uses.
- IRQ 0
- System timer interrupt from TIMER-0. No
user-definable options.
- IRQ 1
- Keyboard
- IRQ 2
- Cascade for IRQs 8-15. This is like an
overlap IRQ for the higher-numbered IRQs. IRQ 2 is often a link from IRQ 9.
For example, a SCSI controller set to IRQ9 would cascade to IRQ 2.
- IRQ 3
- Available. This IRQ should be used for
COM2/COM4. Typically, modems work well on IRQ 3. Two devices can share the
same IRQ if they have different COM ports. For example, you can have an
internal modem set on COM2/IRQ 3, and an external radio-modem or scanner on
COM4/IRQ 3. You will not encounter any IRQ conflict unless you try to operate
both devices simultaneously. For this reason, do not share the IRQ you use for
the mouse, since the mouse is used so often.
- IRQ 4
- Available. IRQ 4 usually services
COM1/COM3, and provides the standard serial mouse connection. As stated above,
it is not a good idea to have the mouse use a shared IRQ.
- IRQ 5
- Available. This this the most common IRQ
for a secondary printer port. This is also the default IRQ for many sound
cards, including the SoundBlaster series. If a network card needs a low IRQ, 5
will usually do.
- IRQ 6
- Floppy Drive controller. No
user-definable options.
- IRQ 7
- Primary parallel (printer) port. It is
not a good idea to set use IRQ 7 for anything except parallel.
- IRQ 8
- Real Time Clock. No user-definable
options.
- IRQ 9
- Available. This IRQ overlaps to 2. IRQ 9
is a good IRQ to use for SCSI host adapters, network cards, and sound cards
that can't use IRQ5 for some reason. SCSI cards should use IRQ 9 or 11.
- IRQ 10
- Available. This is a good IRQ for a
network card, since most devices can't use it.
- IRQ 11
- Available. This is the 2nd choice IRQ for
a SCSI controller.
- IRQ 12
- Available. Similar to 10,11. This is the
IRQ used for a Bus Mouse (which comes in handy).
- IRQ 13
- Math Coprocessor. No user-definable
optinos.
- IRQ 14
- Hard disk controller (IDE). Each IDE
channel requires its own IRQ. You can control 2 IDE devices with 1 IRQ.
- IRQ 15
- Secondary IDE channel. If you disable the
secondary channel, this becomes available.
The trick is to balance your
IRQs so that the do not overlap. Prioritize you devices by how picky they are.
For instance, a COM port will need to use IRQ 3 or 4 (see COM ports below). You
can not put a modem on IRQ 5, since it requires a COM port; just as your serial
mouse does. Devices that do not do well on high (above 7) IRQs, eg sound cards,
should be filled in next. The last things to worry about are devices that have
their own ROM to store IRQ and base IO addresses, like network and SCSI cards.
Network and SCSI cards will be able to use the high IRQs with no problem. These
defaults usually work fine:
Mouse COM1 IRQ4
Modem COM2 IRQ3
Sound Card no COM IRQ5
Printer no COM IRQ7
SCSI Card no COM IRQ9
Netwrok Card no COM IRQ10
Bus Mouse no COM IRQ12
Secondary IDE no COM IRQ15
Extra Serial COM4 IRQ3 (do not use this at the same time as COM2)
This is a very basic list, but it can be
helpful. The number of possibilities is countless, so you will need to piece
your own puzzle together. It is easier than you think after you try it.
The best advice I can give for avoiding
conficts is to disable everything that you do not use. If you use an internal
modem, disable COM2 on you controller. If you use a bus mouse, disbale your
COM1. If you do not use your 2nd IDE channel, disable it. If you only use a
printer on your parallel port, use it in Standard mode, rather than Enhanced.
Enhanced Mode will not let you print any faster; it is for parallel devices (ZIP
drives, CD-ROMs, LapLink) that use high bandwith. If you are careful, you should
not need to disable unused ports, but it will give you more room to
maneuver.
COM Port Settings
COM ports are esy now that you understand IRQs. Here
are the possible configurations for COM Ports:
COM Interrupt Address
--- --------- -------
COM1 IRQ4 3f8h
COM2 IRQ3 2f8h
COM3 IRQ4 3e8h
COM4 IRQ3 3f8h
Although there are 4 COM ports,
there are only 2 IRQs for them. In essence, you can have 4 serial devices
attached, but use only 2 at a time. And since your mouse is usually in use, it
is not a good idea to use anything that shares an IRQ with the mouse. That only
leaves us with three simple configurations:
COM1 IRQ4
COM2 IRQ3
COM4 IRQ3
If you need more devices, you can use a Bus
Mouse to free up COM1 / COM3, or buy a Multiport Board which can handle from 2
to 128 ports. Modems will work fine on any COM port. Internal modems are usually
defaulted to COM4 to avoid a conflict with the existing controller. This works
fine, but you do have an extra COM port enable that is not in use (probably).
Most software is defaulted to COM2, so what I usually do with internal modems is
to disable the second COM port on the controller and use the modem at COM2.
External modems are set by configuring your COM port on the controller. Whatever
that is set to, your modem wil use. This is usually defaulted to COM2.
Parallel Port Settings
Parallel port settings are similar to COM port
settings. A PC can use up to 3 parallel devices. Here are the default
settings:
LPT Port IRQ Address
-------- --- -------
LPT1: 7 278h
LPT2: 5 378h
LPT3: 3bch
You can share IRQs for parallel
ports as well, but once again not simultaneously. Most computers will only need
1 Parallel port.