-----------------------------------------------------------------------HMCS404AC
Instruction
Cycles
Instruction
execution
Interrupt
accepted
2
Stacking.
Reset of
lIE
3
Stacking,
Vector
address
is
generated
4
5
..!MPL
instruction execution on
the
vector address
6
Fig.7
Interrupt
Servicing
Sequence
Instruction
Execution
at
starting address
of
the
interrupt
routine
• Interrupt Enable Flag (lIE: $000,0)
The
Interrupt
Enable Flag controls enable/disable
of
all inter-
rupt
requests
as
shown in Table 3. The Interrupt Enable Flag
is
reset by the interrupt servicing
and
set by RTNI instruction.
Table 3.
Interrupt
Enable Flag
Interrupt
Enable Flag
Interrupt Enable/Disable
o
Disable
Enable
• External
Interrupt
(I
NT
0,
I
NT
I )
To
use
external interrupt, select
R32
/INT
0,
R33
/INT I
port
for INTo, INTI mode by setting the Port Mode Register (PMR:
$004).
The External
Interrupt
Request Flags (IFO,
IF!)
are set
at
the
falling edge
of
INT
0,
INT I inputs.
INT
1
input
can be used
as
a clock signal input
of
TIMER-B.
Then, TIMER-B
counts
up
at
each falling edge
of
input. When
using
INTI
as
TIMER-8 external event, an External Interrupt
Mask (1M!) has
to
be set so
that
the interrupt request by INTI
will
not
be
accepted.
• External Interrupt Request Flag (I
FO:
$000,2,
I F1: $001,0)
The
External
Interrupt
Request Flags (IFO,
1Ft)
are set
at
the
falling edges
of
INTo, INT 1 in puts respectively.
• External
Interrupt
Mask
(lMO:
$000,3,
IM1: $001,1)
The External
Interrupt
Mask
is
used
to
mask
the
external
interrupt requests.
Table 4. External Interrupt Request Flag
External
Interrupt
Request
Flags
Interrupt
Requests
o
No
Yes
311
Table
5.
External I nterrupt Mask
External
Interrupt
Masks
Interrupt
Requests
o
Enable
Disable
(masks)
• Port Mode Register (PMR: $004)
The Port Mode Register
is
a 4-bit write-only register which
controls the
R32
/INT 0 pin,
R33
lINT I pin,
~
I lSI pin and
~2
ISO pin
as
shown in Table 6. The Port Mode Register will
be initialized
to
$0 by
MeV
reset,
so
that
all these pins are set
to
a
port
mode.
Table 6. Port Mode Register
PMR
R33/INTI pin
bit
3
0
Used
as
R33
port
input/output
pin
Used
as
I
NT
I input pin
PMR
Rn
/1
NT
0 pin
bit
2
0
Used
as
R32
port
input/output
pin
Used
as
I
NT
0 input pin
PMR
R
41
/SI pin
bit
1
0
Used
as
R41
port
input/output
pin
Used
as
SI
input pin
PMR
bit
0
R42/S0
pin
0
Used
as
R42
port
input/output
pin
Used
as
SO
output pin