| Optimisation - Repairing |
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
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:
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:
All this information, however, is transparent to the average user, who doesn't need to worry about it.
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.
The IRQ of a card can be modified, as it needs to be allocated an IRQ number that is not used by another peripheral.
| IRQ | Peripheral |
|---|---|
| 0 | Internal clock |
| 1 | keyboard |
| 2 | programmable interrupt controller
Redirected to IRQs 8 to 15 |
| 3 | COM2/COM4 communication port |
| 4 | COM1/COM3 communication port |
| 5 | free |
| 6 | floppy disk controllers |
| 7 | LPT1 printer port |
| 8 | CMOS (Real time clock) |
| 9 | free |
| 10 | free |
| 11 | free |
| 12 | PS2 mouse port/free |
| 13 | numerical data processor
(Math coprocessor) |
| 14 | primary hard drive controller (IDE) |
| 15 | 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 behaviour. |
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.
| 25/03 15h09 | IRQ is normally used by LPT2 | 1 |