Data Transfer Control Timing - NEC PD78212 User Manual

8-bit single-chip microcomputer sub-series
Table of Contents

Advertisement

TM1 count value
0H
INTC10
timer interrupt
Compare register
(CR10)
Buffer register
POL
P00
P01
P02
P03
(4) Example of using automatic addition control and ring control
(a) Automatic addition control
The automatic addition control function adds the output timing data (∆t) specified by a macro service
pointer (MPT) to the contents of a compare register and writes the sum to the compare register.
Using this function makes it unnecessary for software to calculate the setting for the compare register
each time the compare register has to be set.
(b) Ring control
The ring control function cyclically outputs a pattern of predetermined output data.
When this function is used, only one cycle of output data pattern must be prepared even if more data
patterns are required. Therefore, the required data ROM area can be kept small.
The macro service counter (MSC) is decremented each time one data transfer is performed.
The ring control function also generates an interrupt request when MSC = 0.
Let's take an example of controlling a stepping motor. The data pattern output to the steeping motor
varies with the structure and excitation method (single-phase or double-phase excitation) of the motor.
In any case, the output pattern is repeated. Fig. 12-29 and 12-30 show examples of controlling a 4-phase
stepping motor with the phase 1 excitation method and the phases 1 and 2 excitation method,
respectively.
Fig. 12-28 Data Transfer Control Timing
T3
T2
T1
T1
T2
T3
D1
D2
D3
Chapter 12 Interrupt Functions
T5
T4
T4
T5
T6
D4
D5
D6
T6
T8
T7
T7
T8
T9
D7
D8 D9
12
337

Advertisement

Table of Contents
loading

Table of Contents