321
Chapter 12 Interrupt Functions
12
(3) Type C
Transfers 1-byte data from memory to the real-time output port and the compare register for 8-bit timer/
counter 1 upon each interrupt request. When a specified number of data transfers are performed, a vectored
interrupt request is generated.
Type C macro service transfers data to two locations upon one interrupt request. In addition, it can be used
together with output data ring control and automatic addition of the compare register contents to data.
Use of type C is limited to INTC10 and INTC11. The SFRs to which data can be transferred are also limited.
A 64K-byte memory area, addresses 0000H through FEFFH, can be used.
Type C is a macro service for real-time output port and is suitable for controlling stepper motors.
12.4.3 Macro Service Basic Operation
The interrupt request that can specify the macro service processing and that is generated by the algorithm shown
in Fig. 12-10 is handled basically by using the sequence shown in Fig. 12-15.
An interrupt request that can specify a macro service is not affected by the state of the IE flag. It is disabled by
setting the interrupt mask flag in the interrupt mask register (MK0) to 1. The macro service processing is performed
regardless of whether interrupts are disabled and whether a macro service processing is already being performed.
Fig. 12-15 Macro Service Processing Sequence
The type of a macro service and the direction of its data transfer are determined by the value in the mode register
in the macro service control word. Then the macro service channel specified by a channel pointer is used according
to the type of macro service for data transfer.
A macro service channel contains the macro service counter to hold the number of data transfers to be performed,
transfer destination and source pointers, and data buffers. It is mapped to locations from FE00H through FEFFH
in the internal RAM.
Execute macro service processing
MSCMSC 1
MSC = 0?
Interrupt request flag0
××ISM0
Yes No
; Transfers data and controls real-time output port
; Decrements macro service counter (MSC)
Next instruction is executed.Vectored interrupt request is generated
Interrupt request that can specify
macro service processing occurs.