tmp86fh46bng TOSHIBA Semiconductor CORPORATION, tmp86fh46bng Datasheet - Page 56

no-image

tmp86fh46bng

Manufacturer Part Number
tmp86fh46bng
Description
8 Bit Microcontroller Tlcs-870/c Series
Manufacturer
TOSHIBA Semiconductor CORPORATION
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
TMP86FH46BNG
Manufacturer:
TOSHIBA/东芝
Quantity:
20 000
3.4
Interrupt Sequence
Example 1 :Returning from address trap interrupt (INTATRAP) service program
Example 2 :Restarting without returning interrupt
3.4.3
Figure 3-4 Saving/Restoring General-purpose Registers under Interrupt Processing
PINTxx:
PINTxx:
restarting address, during interrupt service program.
(In this case, PSW (Includes IMF) before interrupt acceptance is discarded.)
rupt can be accepted immediately after the interrupt return instruction is executed.
Interrupt return
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
Interrupt requests are sampled during the final cycle of the instruction being executed. Thus, the next inter-
Note:If [RETN] is executed with the above data unaltered, the program returns to the address trap area
and 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
WA
WA, Return Address
WA
SP
SP
SP
EIRL, data
Restart Address
1. Program counter (PC) and program status word
(PSW, includes IMF) are restored from the stack.
2. Stack pointer (SP) is incremented by 3.
Interrupt
acceptance
[RETI]/[RETN] Interrupt Return
Interrupt return
Page 38
Interrupt
service task
; Recover SP by 2
;
; Alter stacked data
; RETURN
; Recover SP by 3
;
;
; Set IMF to “1” or clear it to “0”
; Jump into restarting address
Saving
registers
Restoring
registers
TMP86FH46BNG

Related parts for tmp86fh46bng