PDA

View Full Version : Microchip (PWM) - difference between duty cycle and frequency


LM741
Aug3-06, 12:26 PM
Hey guys.

Just trying to program a microchip.

Trying to grasp the concept of PWM.

I know that varying the duty cycle will vary the speed of my motors...but there are other registers that allow you to set the frequency of the PWM peripheral...NOw i'm getting confused...isn't the duty cycle the frequency because essentially you're adjusting the time that the wave is on or off...?? hence your adjusting the frequency...?

Thanks

berkeman
Aug3-06, 02:05 PM
PWM can be done at either a fixed frequency (where you vary the on time and off time both to maintain the same total time for each cycle), or with variable frequency (like with a fixed off time and variable on time).

doodle
Aug3-06, 11:56 PM
Duty cycle is the pulse duration divided by the pulse period. Frequency equals the reciprocal of the period.