摘要 |
PROBLEM TO BE SOLVED: To provide a motor control apparatus in which it is not required to install a data bus or the like at the outside from a microcomputer and which can miniaturize a circuit by using a counter and a register which are built in the microcomputer. SOLUTION: A counter 2 counts output pulses mpls from a pulse generator. A counter 3 counts the internal clock of a microcomputer 1. The frequency of the internal clock is set to be sufficiently higher than the frequency of the output pulses from the pulse generator 5. In addition, clock pulses at a constant cycle may be input from the outside so as to be measured. The counted value of the counter 3 is latched at the rise and the fall of the output pulses mpls of the pulse generator 5. The counter 2 indicates the counted value of the pulses, and the register 4 indicates the input time of the pulses. Thereby, the value of the counter 2 and that of the register 4 are fetched at every constant sampling by software, and the speed of motor is computed. |