What is an interrupt?
Since the processor cannot process multiple pieces of data at the same time (it processes one piece of data a time, multitasking is actually the alternation of instruction snippets from several different tasks), a currently running program can be momentarily suspended by an interrupt for the time it takes to execute an interrupt service routine. The interrupted program may then continue executing. There are 256 different interrupt addresses.
An interrupt is a hardware interrupt when it is requested by a hardware component of the computer. A computer has many peripherals. They generally need to use system resources, if only to communicate with the system...
When they need a resource, they send an interrupt request to the system so that the system will pay attention to them. The peripherals each have an interrupt number, called an IRQ (Interruption request). One way of imagining this is to view each peripheral as pulling on a "string" connected to a bell to signal to the computer that it wants attention.
This "string" is in fact a physical line that connects the slot to the motherboard. For an 8-bit ISA location, for example, there are 8 IRQ (Interruption Request) lines connecting the 8-bit ISA slot to the motherboard, IRQ0 to IRQ7. These IRQs are controlled by an "interrupt controller" which gives control to
the IRQ with the highest priority. For 16-bit slots, IRQs 8 to 15 are added, requiring the addition of a second interrupt controller, the connection between the two groups of interrupts is made via IRQ 2 which is connected to IRQ 9 (called "cascading"). Cascading can be thought of as "inserting" IRQs 8 to 15 between IRQs 1 and 3:
As the priority is given by increasing order of IRQ number, and since IRQs 8 to 15 are inserted between IRQs 1 and 3, the order of priority is the following:
0 > 1 > 8 > 9 > 10 > 11 > 12 > 13 > 14 > 15 > 3 > 4 > 5 > 6 > 7
What is DMA?
Peripherals frequently need to "borrow memory" from the system to use as a buffer, a temporary storage area that allows input or output data to be quickly written.
A direct memory access channel called DMA was defined to address this need.
The DMA channel is an access to a RAM location on the computer referenced by a "RAM Start Address" and an "End address". This method allows a peripheral to use special channels giving it direct access to memory, without involving the microprocessor, which frees the microprocessor from doing this work.
A PC-type computer has 8 DMA channels. The first four DMA channels are 8 bits wide while DMAs 4 to 7 are 16 bits wide.
DMA channels are usually assigned as follows:
- DMA0 - free
- DMA1 - (sound card)/ free
- DMA2 - floppy disk controller
- DMA3 - parallel port (printer port)
- DMA4 - direct memory access controller
(redirected to DMA0)
- DMA5 - (sound card)/ free
- DMA6 - (SCSI)/ free
- DMA7 - available
As peripherals sometimes need to exchange information with the system, memory addresses are assigned to them for sending and receiving data. These addresses are called "base addresses" (the following terms are also sometimes used: "input/output ports", "I/O ports", "I/O address", "I/O port addresses", "base ports", or "Input/Output Address").
It is through the intermediary of this base address that the peripheral can communicate with the operating system. There can therefore only be one base address per peripheral.
Here is a list of some common base addresses:
- 060h - keyboard
- 170h/376h - secondary IDE controller
- 1F0h/3F6h - primary IDE controller
- 220h - sound card
- 300h - network card
- 330h - SCSI adapter card
- 3F2h - floppy disk drive controller
- 3F8h - COM1
- 2F8h - COM2
- 3E8h - COM3
- 2E8h - COM4
- 378h - LPT1
- 278h - LPT2
All this information, however, is transparent to the average user, who doesn't need to worry about
Why are there hardware conflicts?
An interrupt is thus a line connecting a peripheral to the processor, and an interrupt is a hardware interrupt when it is requested by a hardware component of the PC. This is the case, for example, when a key is hit and the keyboard wants to draw the processor's attention to this event. However, the 256 interrupts cannot all be requested as hardware interrupts. The different peripherals always call specific interrupts.
That is why, when installing and configuring expansion cards, you must be sure that the same interrupt is not used by two different peripherals.
If, in fact, two peripherals have the same IRQ, the system will not know to which piece of hardware it should pass control... the system will lock up or function abnormally... this is called a hardware conflict. A hardware conflict does not occur only when two peripherals have the same hardware interrupt. There can also be a conflict if two peripherals have the same input/output address or are assigned to the same DMA channels.
How to configure the IRQs of peripherals
The IRQ of a card can be modified, as it needs to be allocated an IRQ number that is not
used by another peripheral.
- On older cards, it was set using jumpers on the card.
- On more recent cards (that have a Plug & Play BIOS), resources (IRQs, DMAs, Input-Output Addresses) are configured using a little utility (often running under DOS) supplied with the network card (it is generally called setup.exe, install.exe, ezconf.exe, config.exe, ...) that makes it possible to modify the IRQ, DMA,and other values through software.
To be able to modify the parameters manually, you normally have to disable plug & play mode.
- However, many cards are configurable at will (it is possible to assign an IRQ value under Windows). This is particularly true for most sound cards.
It is not always obvious how to find resources for all the peripherals, so here are the resources that are already used and that cannot be assigned to your expansion cards:
||programmable interrupt controller
Redirected to IRQs 8 to 15
||COM2/COM4 communication port
||COM1/COM3 communication port
||floppy disk controllers
||LPT1 printer port
||CMOS (Real time clock)
||PS2 mouse port/free
||numerical data processor
||primary hard drive controller (IDE)
||secondary hard drive controller (IDE)
||As can be seen above, ports COM1 and COM4 use the same interrupt, as do ports COM2 and COM3. This may appear illogical in that the same interrupt cannot be used by two peripherals. In fact, it is possible to use COM1 and COM4 (as well as COM2 and COM3) provided that they are not active simultaneously. Otherwise, the computer may lock up or exhibit abnormal behavior.
Resolving hardware conflicts
When you are facing a problem that you believe is related to the hardware configuration of your machine, the first thing to do is to try to isolate it. This means trying to eliminate all possible variables, generally by opening the machine and removing, one by one, all items that could cause a conflict, or by isolating them through software means (in your operating system), until you find the component that is responsible.