摘要 |
PURPOSE: A pulse width modulation device is provided, which changes a register value while the modulation device is being operated, and has no time delay and is very convenient in an aspect of software. CONSTITUTION: A width register(1) and a period register(2) are stored with width and period information of a signal to be pulse-modulated by a microprocessor(7). A width register buffer and a period register buffer latch the values of the width register and the period register respectively everywhen one period of a pulse ends. An N bit counter(4) counts a length of one period of the pulse by a control signal of a control part(3). A comparator part(5) outputs a phase inversion control signal by comparing the values of the width register buffer and the period register buffer with the value of the counter. A pulse output part(6) outputs a pulse by inverting a phase of the pulse by the phase inversion control signal being output from the comparator part. And the control part controls a latch operation and a pulse width modulation operation of the width register buffer and the period register buffer.
|