Interrupts: Department of Computer Science & Engineering BRAC University
Interrupts: Department of Computer Science & Engineering BRAC University
BRAC University.
Interrupts
Course ID: CSE341
Course Title: Microprocessors
Lecture References:
• Book:
• Microprocessors and Interfacing: Programming and
Hardware, Author: Douglas V. Hall
• Microprocessor and Microcomputer – Based System
Design, Author: Mohamed Rafiquzzaman
Maskable Interrupts
• Interrupt from mouse, keyboard or other peripherals
00E80
00012
00E92
012h
0E8h
I/O
µP I/O
... device n
device1
You You? You?
?
8086
8259
CSE – 341 : Microprocessors
33
BRAC University
Registers
• IRR:
0 0 0 1 0 1 0 0
11 18
D0 IR0
10 IR1 19
D0 9
D1
D2 IR2 20
8 D3 IR3 21
7 D4 IR4 22
6 23
D5 IR5
5 24
4 D6 IR6 25
D7 8259A IR7
27
A0
1 CS΄
3 RD΄
2 WR΄
16 CAS0 12
SP/EN΄ 13
17 CAS1
8 0 8 8 S y ste m
26 INT 15
CAS2
INTA΄
D7
A1
A0
A 11
A 10
A9
A8
A7
A6
A5
A 19
A4
A3
A2
A0
IO / M '
RD
WR
INTR
INTA΄
40
The programmable peripheral Interface
The 82C55 programmable peripheral interface (PPI) is a very
popular low-cost interfacing component that is used found in
many applications.
Applications range from 7-segment display, stepper motor
connection, counters to key pad management.
This device is still in use today in P4 Computers and is used to
interface and detect key presses on modern keyboards, parallel
printers and other interfacing chipsets.
For those of you who are doing computer interfacing course you
will be extensively using this device to interface various devices
with the PC.
82C55 Programmable Peripheral Interface
82C55 Features
• It consists of 3 ports for I/O.
• Each port is 8-bit. So total 24 pins.
• The I/O pins can be programmed in groups of 12 pins.
• Address A0 and A1 (these are input of 8255 not 8086) are
used to select the port to read/write.
• Data are transferred through a 8-bit bidirectional data bus.
• Chip select ()of the 8255 must be enabled.
• There are three distinct modes of operation Mode 0, Mode
1 and Mode 2.
• Group A connections consists of Port A(PA0-PA7) and the
upper half of port C (PC4-PC7).
• Group B connections consists of Port B (PB0-PB7) and the
lower half of port C (PC0-PC3).
82C55 port selection table
CS’ A1 A0 SELECTION ADDRESS
0 0 0 PORT A 80 H
0 0 1 PORT B 81 H
0 1 0 PORT C 82 H
Control
0 1 1 Register 83 H
1 X X No X
Seletion
45
82C55 operation modes
There are 2 modes in 8255 microprocessor:
• Bit set reset (BSR) mode – This mode is used to set
or reset the bits of port C only, and selected when
the most significant bit (D7) in the control register
is 0. Control Register is as follows:
D7 D7 PA7 D7
8255 Keyboard
IORC΄ RD΄
WR΄ DAV΄
A1 A0 PC 3
A2 A1 PC 4
RESET RESET
WAIT΄ CS΄
IOWC΄ I1 O1
8088 System
A0
A3
A4
A5 16L8
A6
A7
A8 O8
A9
A10 I10
A11
A12
A13
A14
A15
INTR
G2
LS244
G1
INTA΄
+5V