Documente Academic
Documente Profesional
Documente Cultură
Interrupts
Interrupt is a process where an
external device can get the
attention of the microprocessor
1 EEE/DSDCA/SV
2 3/20/2014
Interrupt
Event inside a computer system requiring some
urgent action by the CPU
CPU suspends the current program execution
Saves PC on to stack(saving registers)
branches to ISR(interrupt service routine)
CPU returns to the main program
EEE/DSDCA/SV
4 3/20/2014
EEE/DSDCA/SV
5 3/20/2014
Interrupt types
External interrupts
Internal interrupts/traps
Software interrupts
EEE/DSDCA/SV
6 3/20/2014
1.External interrupts
Initiatedthrough computers interrupt pins by
external devices
ADC
Two types
Maskable
Non maskable
EEE/DSDCA/SV
7 3/20/2014
Maskable interrupt:
Enabled or disabled by executing instructions like El
or DI
EI IE flag
Eg:
Intel 8086
DI IE flag = 1,no maskable interrupt
EEE/DSDCA/SV
DI IE flag = 0 , maskable interrupt
8 3/20/2014
EEE/DSDCA/SV
9 3/20/2014
2. Internal interrupts
Activated internally by exceptional conditions
such as overflow, division by zero or execution
of an illegal op-code
EEE/DSDCA/SV
10 3/20/2014
3.Software interrupts
Software interrupt is created by the program
So that the CPU can temporarily branch from
the current program to another program.
EEE/DSDCA/SV
11 3/20/2014
Interrupt priorities
processor provided with one or more interrupt
pins on the chip.
Polled interrupt
EEE/DSDCA/SV
13 3/20/2014
EEE/DSDCA/SV
14 3/20/2014
For large number of devices the time required to poll each device
may exceed the time required to service the device
example
Several external devices are connected to a
single interrupt line of the processor via OR
gate
EEE/DSDCA/SV
17 3/20/2014
EEE/DSDCA/SV
18 3/20/2014
EEE/DSDCA/SV
19 3/20/2014
EEE/DSDCA/SV
20 3/20/2014
EEE/DSDCA/SV
21 3/20/2014
EEE/DSDCA/SV
22 3/20/2014
EEE/DSDCA/SV
23 3/20/2014
EEE/DSDCA/SV
24 3/20/2014
EEE/DSDCA/SV
26 3/20/2014
EEE/DSDCA/SV
27 3/20/2014
BUSY HIGH
Output of AND gate HIGH
low
EEE/DSDCA/SV
28 3/20/2014
If
device 1 does not generate BUSY high output of
AND gate becomes low
EEE/DSDCA/SV