PWM Signal

Thread Starter


Joined Sep 5, 2004

How to write the Fully-Wave-Rectifier-Sine-Wave modulated pulses at 50Hz program?

How to use this pulses to compare the triangle-wave and produce the PWM signal?

I am using PIC16F84A or PIC16F877A chip and need the C program.


Joined Apr 20, 2004

Unless this project is some kind of challenge, it sounds over-elaborate. Pulse-width modulation, as applied to motor control, is simply applying current through the motor windings for some part of the pulse period. Full modulation is 0% (no current) to 100% (current flows for the entire period).

Using a microcontroller, it's only necessary to produce an on-off waveform. Say you have a time period in which an internal counter can do 128 counts. If your error signal can control the number of counts that allow the output to be high in each period, you have the means to give better than 1% control over the motor. Generating multiple waveforms to do the controlling, or even establish the basis for the PWM pulse period sounds like a lot of trouble to go to.