English
Language : 

UPD784938 Datasheet, PDF (560/733 Pages) NEC – 16-Bit Single-Chip Microcontrollers
CHAPTER 23 INTERRUPT FUNCTIONS
23.8 Macro Service Function
23.8.1 Outline of macro service function
Macro service is one of the method of interrupts servicing. In the normal interrupt, the start address in the interrupt service
program is loaded into the program counter (PC) by saving the PC or program status word (PSW), in the macro service,
however, another processing (mainly data transfers) is performed instead of these processing. This processing enables
a quick response to interrupt requests. Moreover, processing time can be reduced because the higher transfer speed can
be obtained.
In addition, there is another advantage in simplifying the vectored interrupt program since the vectored interrupt is
generated after the specified number of processing.
Figure 23-16. Differences between Vectored Interrupt and Macro Service Processing
Macro service Main routine
Macro service
processing
Main routine
Context switchingNote 1 Main routine
Note 2
Interrupt
servicing
Note 3
Main routine
Vectored interruptNote 1 Main routine
Note 4
SEL
RBn
Interrupt
servicing
Restore
PC, PSW
Main routine
Vectored interrupt Main routine
Note 4
Save
general
registers
Initialize
general
registers
Interrupt
servicing
Restore
general
registers
Restore
PC & PSW
Main routine
Interrupt request generation
Notes 1. When register bank switching is used, and an initial value has been set in the register beforehand
2. Register bank switching by context switching, saving of PC and PSW
3. Register bank, PC and PSW restoration by context switching
4. PC and PSW saved to the stack, vector address loaded into PC
23.8.2 Types of macro service
Macro service can be used with the 23 kinds of interrupt shown in Table 23-6. There are four kinds of operation, which
can be used to suit the application.
560
Preliminary User’s Manual U13987EJ1V0UM00