tmp86c847iug TOSHIBA Semiconductor CORPORATION, tmp86c847iug Datasheet - Page 48

no-image

tmp86c847iug

Manufacturer Part Number
tmp86c847iug
Description
8 Bit Microcontroller
Manufacturer
TOSHIBA Semiconductor CORPORATION
Datasheet
3.4 Interrupt Sequence
3. Interrupt Control Circuit
Example 1 :Returning from address trap interrupt (INTATRAP) service program
Example 2 :Restarting without returning interrupt
3.4.3 Interrupt return
Figure 3-4 Saving/Restoring General-purpose Registers under Interrupt Processing
(In this case, PSW (Includes IMF) before interrupt acceptance is discarded.)
restarting address, during interrupt service program.
rupt can be accepted immediately after the interrupt return instruction is executed.
Interrupt return instructions [RETI]/[RETN] perform as follows.
As for address trap interrupt (INTATRAP), it is required to alter stacked data for program counter (PC) to
Note:If [RETN] is executed with the above data unaltered, the program returns to the address trap area and
Interrupt requests are sampled during the final cycle of the instruction being executed. Thus, the next inter-
PINTxx:
PINTxx:
INTATRAP occurs again.When interrupt acceptance processing has completed, stacked data for PCL and
PCH are located on address (SP + 1) and (SP + 2) respectively.
Saving/Restoring general-purpose registers using PUSH/POP data transfer instruction
POP
LD
PUSH
(interrupt processing)
RETN
INC
INC
INC
(interrupt processing)
LD
JP
Main task
1. Program counter (PC) and program status word
2. Stack pointer (SP) is incremented by 3.
(PSW, includes IMF) are restored from the stack.
WA
WA, Return Address
WA
SP
SP
SP
EIRL, data
Restart Address
Interrupt
acceptance
[RETI]/[RETN] Interrupt Return
Interrupt return
Page 40
Interrupt
service task
;
;
; Set IMF to “1” or clear it to “0”
; Recover SP by 2
;
; Alter stacked data
; RETURN
; Recover SP by 3
; Jump into restarting address
Saving
registers
Restoring
registers
TMP86C847IUG

Related parts for tmp86c847iug