English
Language : 

UPD784938 Datasheet, PDF (564/733 Pages) NEC – 16-Bit Single-Chip Microcontrollers
CHAPTER 23 INTERRUPT FUNCTIONS
23.8.4 Operation at end of macro service
In macro service, processing is performed the number of times specified during execution of another program. Macro
service ends when the processing has been performed the specified number of times (when the macro service counter
(MSC) reaches 0). Either of two operations may be performed at this point, as specified by the VCIE bit (bit 7) of the macro
service mode register for each macro service.
(1) When VCIE bit is 0
In this mode, an interrupt is generated as soon as the macro service ends. Figure 23-18 shows an example of macro
service and interrupt acknowledgment operations when the VCIE bit is 0.
This mode is used when a series of operations end with the last macro service processing performed, for instance.
It is mainly used in the following cases:
• Asynchronous serial interface receive data buffering (INTSR/INTSR2)
• A/D conversion result fetch (INTAD)
• Compare register update as the result of a match between a timer register and the compare register (INTC00/
INTC01/INTC10/INTC11/INTC20/INTC21/INTC30)
• Timer/counter capture register read due to edge input to the INTPn pin (INTP0/INTP1/INTP2/INTP3)
Figure 23-18. Operation at End of Macro Service when VCIE = 0
Main routine
EI
Macro service request
Macro service processing
Last macro service request
Macro service processing
Servicing of interrupt request
due to end of macro service
At the end of macro service
(MSC = 0), an interrupt
request is generated and
acknowledged.
Main routine
EI
Servicing of other interrupt
Other interrupt request
Last macro
service request
Macro service processing
Servicing of interrupt request
due to end of macro service
If the last macro service is
performed when the
interrupt due to the end of
macro service cannot be
acknowledged while other
interrupt servicing is being
executed, tec., that interrupt
is held pending until it can
be acknowledged.
564
Preliminary User’s Manual U13987EJ1V0UM00