
287
CHAPTER 16 INTERRUPT FUNCTION
User
’
s Manual U15017EJ2V0UD
Figure 16-30. Type C Macro Service Channel (2/2)
(b) With ring control
Note
Be sure to set bits 20 to 23 to 0.
(b) Examples of use of automatic addition control and ring control
(i)
Automatic addition control
The output timing data (
t) specified by the macro service pointer (MPT) is added to the contents of the
compare register, and the result is written back to the compare register.
Use of this automatic addition control eliminates the need to calculate the compare register setting value
in the program each time.
(ii) Ring control
With ring control, the predetermined output patterns is prepared for one cycle only, and the one-cycle
data patterns are output repeatedly in order in ring form.
When ring control is used, only the output patterns for one cycle need be prepared, allowing the size
of the data ROM area to be reduced.
The macro service counter (MSC) is decremented each time a data transfer is performed.
With ring control, too, an interrupt request is generated when MSC = 0.
Macro service
counter (MSC)
Timer SFR pointer (TSFRP)
(Bits 8 to 15)
(Bits 8 to 15)
(Bits 8 to 15)
(Bits 0 to 7)
(Bits 0 to 7)
(Bits 0 to 7)
(Bits 16 to 23)
Note
(Bits 16 to 23)
Note
Ring counter (RC)
Channel pointer
Mode register
Timer macro service
pointer (MPT)
Data SFR pointer (DSFRP)
Data macro service
pointer (MPD)
Modulo register (MR)
Macro service
control word
Low addresses
Macro service
channel
High addresses
TSFR
DSFR
Timer buffer area
Data buffer area
Macro service buffer address = macro service pointer