PSOC
Design of a Pulse Width Modulator
Ou Xu Chang
23 February 2012
This report describes the design of a simple Pulse Width Modulator. The design is
consists of data path and control path. The data path is consists of counter, a d-
register, a comparator, a 2:1 multiplexer. The control path is consists of a controller.
The design can output a desired duty cycle and period waveform by inputting a
specified value and setting the width of counter, d-register, and equals. The design
presented here achieves this function by using a traditional hardware description
language VHDL.
Data Flow Block Diagram
Descriptions
A PWM has a single bit output which must be set at one instant time and reset at
another. The behaviour of this operation is using a 2:1 multiplexer. The input in0 and
in1 connected to Vdd and Gnd. So that, it is a one bit data flow component with one
control input sel (select) when sel is set or reset.
The output q of 2:1 multiplexer must be reset first. After some specified time the q
will be set. The clock frequency and the mod number (by setting the package –
pwmconfig) are determined the period of the PWM. D-register stored a pre-set value.
When the count value the count value matches the register value (by use a comparator
to indicate ), the output q of 2:1 multiplexer sets.