M30621ECGP MITSUBISHI [Mitsubishi Electric Semiconductor], M30621ECGP Datasheet - Page 47

no-image

M30621ECGP

Manufacturer Part Number
M30621ECGP
Description
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Manufacturer
MITSUBISHI [Mitsubishi Electric Semiconductor]
Datasheet
Interrupt
Figure 1.10.6. State of stack before and after acceptance of interrupt request
Saving Registers
In the interrupt sequence, only the contents of the flag register (FLG) and that of the program counter
(PC) are saved in the stack area.
First, the processor saves the four higher-order bits of the program counter, and 4 upper-order bits and 8
lower-order bits of the FLG register, 16 bits in total, in the stack area, then saves 16 lower-order bits of the
program counter. Figure 1.10.6 shows the state of the stack as it was before the acceptance of the
interrupt request, and the state the stack after the acceptance of the interrupt request.
Save other necessary registers at the beginning of the interrupt routine using software. Using the
PUSHM instruction alone can save all the registers except the stack pointer (SP).
Address
m – 4
m – 3
m – 2
m – 1
Stack status before interrupt request
is acknowledged
m + 1
m
MSB
Content of previous stack
Content of previous stack
Stack area
LSB
[SP]
Stack pointer
value before
interrupt occurs
Address
m – 4
m – 3
m – 2
m – 1
m
m + 1
Stack status after interrupt request
is acknowledged
MSB
Flag register
Content of previous stack
Content of previous stack
Program counter (PC
Program counter (PC
(FLG
Flag register (FLG
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
Stack area
H
)
counter (PC
Program
M16C / 62 Group (80-pin)
L
)
L
M
)
)
LSB
H
)
Mitsubishi microcomputers
[SP]
New stack
pointer value
47

Related parts for M30621ECGP