|
An Example Of An IRQ
Consider this example
of a device using an IRQ to get service from the CPU, described in
non-technical terms:
The CPU is printing a
word processing document. As the document is printing, the user presses a
key on the keyboard. The keyboard sends an IRQ to the CPU requesting
service.
The CPU receives the
IRQ and stops the printing. Before the CPU turns its attention to the
keyboard, it records all the information that it needs to resume the print
job where it left off. This print job information is stored in a
stack, or place in memory where
information about suspended jobs is kept.
The CPU handles the
keyboard IRQ by accessing the I/O addresses assigned to that IRQ. In this
address is stored the memory address of the keyboard BIOS. The CPU reads
the address, then turns to that address, and executes the program located
there. The program (interrupt handler) processes the keystroke and then
returns an interrupt completed message to the CPU.
The CPU returns to the
stack, retrieves the information about the print job, and continues
printing.
Default IRQ Numbers
And I/O Addresses IRQ I/O Address Device
0 040-05F System
timer
1 060 Keyboard
controller
2 0A0 Access to IRQs
above 7
3 2F8-2FF COM2 and
COM4
4 3F8-3FF COM1 and
COM3
5 1F0-1F8
Sound/parallel port 2 (LPT2)
6 3F0-3F7 Floppy
drive controller
7 278-27F Printer
parallel port (LPT1:)
8 070-07F System
clock
9-10 Available
11 SCSI/available
12 Systemboard mouse
13 0F8-0FF Math
coprocessor
14 IDE hard drive
15 Secondary IDE
hard drive/available
Adding New
Peripherals
When adding new
peripherals to a computer, consider these fundamental principles: The
peripheral is a hardware device that is controlled by software. You must
install both the hardware and the software.
The software might
exist at different levels. For example, a device could require driver
software that interfaces directly with the hardware device and an
applications software package that interfaces with the driver. You must
install all levels of software.
More than one
peripheral device might attempt to use the same computer resources. This
conflict could disable a device or cause it to hang up. Possible conflicts
arise when more than one device attempts to use:
The same IRQ
The same DMA channel
The same I/O addresses
The same upper memory
addresses
Peripheral devices need
(in addition to the standard computer resources you already expect to be
present) the hardware device itself, the firmware, the device driver, and
the applications software.
<Previous>
<Home>
<Next>
|