English
Language : 

UPD784938 Datasheet, PDF (586/733 Pages) NEC – 16-Bit Single-Chip Microcontrollers
CHAPTER 23 INTERRUPT FUNCTIONS
(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.
When controlling a stepping motor, for example, the output patterns will vary depending on the configuration
of the stepping motor concerned, and the phase excitation method (single-phase excitation, two-phase
excitation, etc.), but repeat patterns are used in all cases. Examples of single-phase excitation and 1-2-phase
excitation of a 4-phase stepping motor are shown in Figures 23-33 and 23-34.
586
Preliminary User’s Manual U13987EJ1V0UM00