MIC - UT 1 Solution
MIC - UT 1 Solution
B
Q.01) Attempt the following questions: Marks CO
L
a) Draw and explain the timing diagrams for read and write operations in [10] 2 CO1
the minimum mode of the 8086 processor.
Solution Timing 5
diagram m
Explain
tion 5m
ICW1
ICW1 is compulsory. The address bit, A0 must be ‘0’ while giving
the Initialization control word 1 to the 8259 chip.
A7 to A5(D7 to D5) : The three MSBs i.e. D7 to D5 are required
when interfaced with 8085. In case of 8086, these bits are not required
for 8259 interfaced with 8086
D4 : This bit should always be kept at logic ‘1’
LTIM (D3) : This bit is used t indicate the interrupts are to be level
triggered or edge triggered. If this bit is kept at ‘1’ then the interrupts
IR0 to IR7 are level triggered else they are edge triggered.
ADI(D2) : This bit is again required for 8085 and not required for
8086
SNGL (D1) : This bit is used to indicate the 8259 is in single mode
or cascaded mode. If this bit is ‘1’, then 8259 is in single mode else it
is in cascaded mode. If in cascaded mode then ICW3 will be required.
IC4 (D0) : This bit indicates the requirement of ICW4.
ICW2
ICW2 is compulsory. The address bit, A0 must be ‘1’ while giving
the Initialization control word 2 to the 8259 chip.
T7 to T3 (D7 to D3) : The five bits of ICW2 are used to indicate the
interrupt type to be given to 8086 when an interrupt occurs on a pin of
8259. The last three bits to make the interrupt type eight bit value are
taken as 000 for IR0 to 111 for IR7. Hence the interrupt type
corresponding to a particular interrupt on 8259 pin is generated by
taking the five bits T7 to T3 and concatenated with the three bits
000 to 111.
D2 to D0 : These bits are not required when interfaced with 8086.
ICW3
ICW3 is required on in cascaded mode. The address bit, A0 must be
‘1’ while giving the Initialization control word 3 to the 8259 chip.
ICW3 has a different structure for both master 8259 as well as slave
8259
For master, each of the bit is used to indicate whether a slave is
connected of the corresponding interrupt request (IR) pin or not. A ‘1’
indicates that a slave is connected to the corresponding Interrupt
request pin, while a ‘0’ indicates no slave is connected.
For slave, the ICW3 contains the ID of the device. This is required
for the slave to compare when the acknowledgement is given by the
processor, to realize whether the acknowledgement is meant for the
same slave or another slave. The ID is provided by the master 8259 on
receipt of acknowledgement from the microprocessor on the cascaded
pins
ICW4 is required if IC4 bit of ICW1 was made ‘1’. The address bit,
A0 must be ‘1’ while giving the Initialization control word 4 to the
8259 chip.
D7 to D5 : The three MSBs i.e. D7 to D5 are not required for 8259
interfaced with 8086
SFNM(D4) : This bit indicates whether the 8259 has to operate in
SFNM mode or FNM mode. If this bit is ‘1’, then 8259 has to operate
in SFNM mode, else FNM mode.
BUF and M/S (D3) : These bits are used to indicate whether 8259 is
in buffered mode or not. In case of buffered mode, M/S indicates it’s a
master or a slave. If the BUF bit is ‘1’ and If the M/S bit is ‘1’, it
indicates buffered master, else buffered slave.
AEOI(D1) : This bit is used to indicate whether Automatic end of
interrupt (EOI) or normal end of interrupt
μPM (D0) : This bit is used to indicate the 8259 is connected to 8085
or 8086. If this bit is ‘1’ then 8259 is connected to 8086 else connected
to 8085
OCW1
The address bit, A0 must be ‘1’ while giving the operational control
word 1 to the 8259 chip.
M7 to M0 (D7 to D0) : These bits indicate masking or unmasking of
a particular interrupt request IR0 to IR7 of 8259. If a bit is set to ‘1’,
the corresponding interrupt is disabled or masked, else its enabled or
unmasked. The address bit, A0 must be ‘1’ while giving the
operational control word 2 to the 8259 chip.
OCW2
R, SL and EOI (D7 to D0) : These bits indicate different commands
programming for 8259.
L2 to L0 (D2 to D0) : These bits are used to indicate the level or
the interrupt request IR0 to IR7, when selecting a particular command
using the bits D7 to D0.
For example if the command is “specific EoI command”, then L2 to
L0 specify the interrupt level for which it is specific EoI. For certain
commands like non-specific EoI, the bit D2 to D0 are not required
OCW3
The address bit, A0 must be ‘0’ while giving the operational control
word 3 to the 8259 chip.
D7 and D4 : These bits should always be 0.
ESMM and SMM (D6 and D5) : These bits are used to enable
and disable the Special mask mode.
D3 : This bit should always be ‘1’
P (D2) : This bit is used to indicate giving of poll command from
8259. If the number of interrupt sources are too many and they cannot
be interfaced using even cascaded mode, then the additional interrupt
sources can be connected to8259s connected in poll mode. In this
mode, the INTR pin of 8259 will not be connected to the INTR pin of
8086. This mode may also be required otherwise.
RR and RIS (D1 and D0) : These bits are used to indicate 8259
that the processor wants to read the registers IRR (Interrupt request
register) or ISR (In-service register).