Simple PWM Controller

The PWM controller I designed makes use of a 2-bit Johnson counter to generate an A and B wave form as shown below

snipso

The output wave form has similar properties to a Gray Code, where it can be seen by inspection that only 1 bit changes per clock cycle making it ideal as the basis for a PWM driver. Using a Gray Code can minimize logic glitches caused by static hazards.

Logic equations for 25%, 50%, 75% and 100% duty cycles are derived below by inspection:

The PWM driver has a 2 bit binary coded input for the 4 duty cycles. A 2bit MUX has be used to select the correct wave form.

An external timer should be synchronised to the circuit using a d-type flip-flop and then connected to the CE pin of this PWM module, reducing the frequency of the output wave.

Previous Post:
Next post: