Timing For External Pin Interrupt Setup (Example); Panasonic - Panasonic MN10285K User Manual

Panax series microcomputer
Table of Contents

Advertisement

Interrupts
Interrupt Setup Examples
The main program normally gen-
erates and branches to the inter-
rupt start address.
During the interrupt service rou-
tine, prevent the CPU from
accepting any other maskable
interrupts by setting the IM[2:0]
and IE bits of the PSW to 0.
To accept the same interrupt
during the interrupt service rou-
tine, clear IR flag at the begin-
ning of it.
MN102H75K/F75K/85K/F85K LSI User Manual
3.
Enable interrupts by writing a 1 to the interrupt enable flag (IE) in the PSW
and setting the interrupt masking level (IM[2:0]) to 7 (b'111').
Now if a falling edge occurs on IRQ0 (P00), an interrupt will occur. If the
CPU accepts the interrupt, the program branches to address x'080008'.
Servicing the interrupt
4.
During interrupt preprocessing, read the accepted interrupt group number
register (IAGR) to determine the interrupt group (group 4, in this case).
5.
Branch to the interrupt service routine.
6.
At the beginning of the interrupt service routine, clear the IQ0IR bit in
IQ0ICL to 0.
7.
After the service routine ends, return to the main program with the RTI
instruction.
P00 (IRQ0)
EXTMD
Low level
IQ0IE
IQ0IR
Interrupt servicing
Registers [R/W]
Sequence
Figure 2-5 Timing for External Pin Interrupt Setup (Example)
41

Panasonic

Falling edge
EXTMD(W)
IQ0ICH(B)
IQ0ICL(B)
IQ0ICL(B)
(1)
(2)(3)
(4)(5)(6)(7)
Panasonic Semiconductor Development Company
IQ0ICL(B)
(4)(5)(6)(7)

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mn102f75kMn102f85kMn102h75kMn102h85k

Table of Contents