EasyManua.ls Logo

Lexicon MPX-1 - Page 41

Lexicon MPX-1
59 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
What is happening to the ISR register? While in the main
program, no
ISR
bits
are set since there aren't any inter·
rupts in service. When the IR3 interrupt is acknowl-
edged, the ISR3 bit
is
set. When the
IR1
interrupt is
acknowledged, both the
ISR1
and the ISR3
bits
are set,
indicating that neither routine is complete. At
this
time,
only
IRO
could generate an interrupt since
it
is the only
input with a higher priority than those previously in ser·
vice. To terminate the
IR1
routine, the routine must
inform the 8259A that
it
is
complete by resetting
its
ISR
bit. It does
this
by executing an
EOI
command. A
"return"
instruction
then transfers execution back
to
the IR3 routine. This allows IRO-IR2 to interrupt the IR3
routine again. since ISR3 is the highest
ISR
bit set.
No
further interrupts occur in the example so the
EOI
com·
mand resets ISR3 and the
"return"
instruction causes
the main program
to
resume at
its
pre·interrupt location,
ending the example.
A single
B259A
is essentially always in the fully nested
mode unless certain programming conditions
disturb
it.
The following programming conditions can cause the
B259A
to
go
out
of
the high to low priority structure of
the fully nested mode.
The automatic
EOI
mode
The special mask mode
A slave
with
a master not in the special fully nested
mode
These modes will be covered in more detail later,
however, they are mentioned now so the user can
be
aware of them. As long as these program conditions
aren't inacted, the fully nested mode remains undis-
turbed.
End of InteRupt
..
"
Upon completion of an interrupt service routine the
8259A needs
to
be notified so its ISR can
be
updated.
This is done
to
keep track of which interrupt levels are in
the process of being serviced and their relative priori.
ties. Three different End·Of·lnterrupt
(EOI)
formats are
available for the user. These are: the non-specific
EOI
command, the specific
EOI
command, and the auto-
matic
EOI
Mode. Selection
of
which
EOI
to
use
is
depen·
dent upon the interrupt operations the user wishes
to
perform.
Non·Specific EOI Commend
The main advantage of using the non·specific
EOI
com·
mand is that
IR
level specification isn't necessary
as
in
the
"Specific
EOI
Command",
covered shortly.
However, special consideration should
be
taken when
deciding to use the non·speciflc
EOL
Here
are
two pro·
gram conditions in which it is best not used
Using the set priority command within
an
Interrupt
service routine.
Using a special mask mode.
These conditions
are
coveled in more detal!
In
their own
sections. but are listed here
fo~
the users reference
Specific EOI Commend
A specific
EOI
command sent from the microprocessor
lets the 8259A know when a service routine of a particu·
lar interrupt level is completed. Unlike a non·specific
EOI
command, which automatically resets the highest
priority ISR bit, a specific
EOI
command specifies an
exact ISR bit
to
be reset. One
of
the eight
IR
levels of the
B259A
can
be
specified in the command.
The reason the specific
EOI
command is needed, is to
reset the lSR
bit
of a completed service routine when-
ever the 8259A
isn't
able to automatically determine it.
An example
of
this
type of situation might be
if
the
priorities of the interrupt levels were changed during an
interrupt routine ("Specific Rotation")
In
this case,
if
any other routines were in service at the same time. a
non·specific
EOI
might reset the wrong ISR bit. Thus the
specific
EOI
command is the best bet in this case, or for
that matter, any time in which confusion of interrupt
priorities may exist. The specific
EOI
command
can
be
used in all conditions
of
8259A operation, including
those that prohibit non·specific
EOI
command usage.
Autom.tlc EOI Mode
When programmed in the automatic
EOI
mode, the
microprocessor no longer needs to issue a command
to
notify
the 8259A
it
has completed
an
interrupt routine.
The
825.9A
accomplishes
this
by
performing a non-
speCific
EOI
automatically at the trailing edge of the last
INTA pulse (third pulse in
MCS·BO/85.
second in
MCS-86).
The obvious advantage of the automatic
EOI
mode over
the other
EOI
command is no command has
to
be
issued. In general,
this
simplifies programming and

Related product manuals