Introduction to Data Communications
Previous 38a. IRQs, DMAs and Base Addresses Next

38a. IRQs, DMAs and Base Addresses

When a NIC is configured, you are setting the parameters which tell the computer network software where to find the adapter (base address) and who is "tapping the CPU on the shoulder" (IRQ). The base address is the pointer to the rest of the world that says "Here I am at base address xxx!". The IRQ is the "tap on the shoulder" to the CPU that says "Hey, it's IRQx, I've got something important to say!". The Upper Memory Block is the NIC's BIOS or actual program in the NIC's ROM. It is set to a free area of memory in the PC's upper memory - to avoid conflicts with other devices (video cards, internal modems, SCSI drivers, etc..).

IRQ - Interrupt Requests

IRQ stands for Interrupt ReQuest. It is a "tap on the shoulder" to the CPU by a peripheral card plugged in an ISA slot to tell the CPU that the peripheral has something to say (also used by EISA and MCA slots). Common peripherals are modems, NICs (network interface cards), sound cards, SCSI adapters, hard-drive controllers, floppy drive controllers, COM ports and printer ports.

An IRQ is a hardware interrupt, this means that there is a physical line run to each of the ISA slots on the motherboard. There are 2 types of ISA slots: 8 bit and 16 bit. The 16 bit consists of the 8 bit slot plus a 16 bit extension slot. There are 8 IRQ (IRQ0-7) lines that run to the 8 bit ISA slot. There are 8 more (IRQ8-15) that run to the 16 bit ISA extension slot. For a total of 16 IRQs in a typical ISA bus PC.

IRQ0 has the highest priority and IRQ7 the lowest priority. IRQ8-15 have "special" priority as will be explained. When IBM introduced the AT computer, they added IRQ8-15. In order to make AT (286) PCs backward compatible with 8 bit XT (8088) PCs and to "up" the priority of the new IRQ lines, they cascaded two interrupt controllers. This results in IRQ8-15 having the same priority as IRQ2. Priority means if two IRQs are active at the same time, the one with the higher priority is serviced first.

IMPORTANT: An IRQ can be assigned to only ONE active device at a time. If 2 devices share the same IRQ, this is called a CONFLICT. This means that when the IRQ line becomes active, the CPU does not know which device needs to "talk".

For example, if a modem used IRQ5 and a NIC used IRQ5. When the modem had some information that needed to be passed on to the CPU, it would set IRQ5 active. The CPU would not know whether to talk to the NIC or modem. The computer may hang, or nothing would happen.

*** IRQ conflicts are the NUMBER 1 source of PC problems! ***

Here is a table that is used as a rule of thumb (guideline) in selecting IRQs for PCs. The IRQs are listed in order of priority. (Note that not all IRQ lines go to the card slots)


	IRQ	Function		Physical Line	   ISA Bus



	IRQ0	System Timer			No

	IRQ1	Keyboard Controller		No		-

	IRQ2	Cascaded to IRQ8-15		No		-

	IRQ8	Real-time clock			No		-

	IRQ9	*-Available	(IRQ2)		Yes		8/16 bit

	IRQ10	NIC				Yes		16 bit

	IRQ11	SCSI adapter			Yes		16 bit

	IRQ12	Motherboard mouse/available	Yes		16 bit

	IRQ13	Math coprocessor		No		-

	IRQ14	Primary IDE controller		Yes		16 bit

	IRQ15	Secondary IDE controller	Yes		16 bit

	IRQ3	Com2/Com4			Yes		8 bit

	IRQ4	Com1/Com3			Yes		8 bit

	IRQ5	Sound card/LPT2			Yes		8 bit

	IRQ6	Floppy drive controller		Yes		8 bit

	IRQ7	Parallel port LPT1		Yes		8 bit

*- IRQ9 appears as if it is IRQ2. Normally not used because it can cause interesting problems to appear. Is it really IRQ9 or is it the IRQ2 cascaded to IRQ9? Which do you set it to? What if you are using an 8 bit ISA modem in a 16 bit ISA slot? See what I mean...

The preceding table is a rule of thumb or guideline to selecting IRQs for your peripherals. For example if the PC does not use a SCSI adapter than IRQ11 is available for use for another NIC card or another device. Most autodetecting software or operating systems expect to see the IRQs assigned as above.


Introduction to Data Communications
Previous Table of Contents Next