English
Language : 

UPD784218 Datasheet, PDF (49/92 Pages) NEC – 16-/8-BIT SINGLE-CHIP MICROCONTROLLERS
µPD784218, 784218Y
9.3 Context Switching
When an interrupt request is generated or when the BRKCS instruction is executed, a predetermined register
bank is selected by hardware. Context switching is a function that branches execution to a vector address stored
in advance in the register bank, and stacks the current contents of the program counter (PC) and program status
word (PSW) to the register bank.
The branch address is in a range of 0 to FFFFH.
Figure 9-1. Context Switching Operation When Interrupt Request Is Generated
0000B
<7> Transfer
PC19-16
PC15-0
<2> Save
(bits 8 through 11
of temporary register)
<6> Exchange
<5> Save
Temporary register
<1> Save
PSW
Register bank n (n = 0 to 7)
A
X
Register bank
(0 to 7)
B
C
R5
R4
R7
R6
V
VP
U
UP
<3> Switching of register bank
T
D
E
(RBS0 to RBS2 ← n)
<4> RSS ← 0
W
H
L
IE ← 0
9.4 Macro Service
This function is to transfer data between memory and a special function register (SFR) without intervention by
the CPU. A macro service controller accesses the memory and SFR in the same transfer cycle and directly transfers
data without loading it.
Because this function does not save or restore the status of the CPU, or load data, data can be transferred at
high speeds.
Figure 9-2. Macro Service
CPU
Memory
Read
Write
Macro service
controller
Write
Read
SFR
Internal bus
Data Sheet U12304EJ2V0DS00
49