Microchip (PWM) - difference between duty cycle and frequency

AI Thread Summary
In PWM (Pulse Width Modulation), the duty cycle and frequency are distinct concepts. The duty cycle refers to the percentage of time the signal is on during a cycle, while frequency is the number of cycles per second. Varying the duty cycle can control the speed of motors, but it does not directly change the frequency unless the total cycle time is altered. PWM can operate at a fixed frequency with varying duty cycles or a variable frequency with fixed duty cycles. Understanding these differences is crucial for effective microchip programming.
LM741
Messages
130
Reaction score
0
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
 
Physics news on Phys.org
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).
 
Duty cycle is the pulse duration divided by the pulse period. Frequency equals the reciprocal of the period.
 
Back
Top