beautypg.com

Chapter 16 application examples, 1 open-loop control of stepper motors – NEC PD78214 User Manual

Page 424

background image

395

16

CHAPTER 16 APPLICATION EXAMPLES

16.1 OPEN-LOOP CONTROL OF STEPPER MOTORS

This section provides an example of controlling stepper motors with the real-time output function, 8-bit timer/
counter 1, and the macro service function of the

µPD78214.

Fig. 16-1 shows the functional blocks for controlling two stepper motors.

An interrupt signal is generated when the value in 8-bit timer/counter 1 (TM1) is matched with the value in compare
register CR10 or CR11. The interrupt signal triggers a macro service in which the CPU automatically transfers table
data prepared in memory to the compare register and the buffer register for the real-time output port. Data
transferred to the compare register is used for the interval before the generation of the next interrupt.

Data transferred to the buffer register is output from port 0.

Open-loop control of stepper motors with the

µPD78214 has the following advantages:

(1) The real-time output function provides accurate control (output) signals based on a specified interval.

(2) Two stepper motors can be independently controlled with an 8-bit timer/counter and two compare registers.

Hardware can thus be efficiently used.

(3) The macro service function can perform complicated control, such as the acceleration/deceleration of stepper

motors, without the need for software.

This manual is related to the following products: