Iam bit confused with pwm resolution in pic controllers. Generally i am using the following equation to calculate ptper reguster
Frequency of clock/ pwm frequency = ptper value. The duty cycle is loaded based on the value of ptper value
Pdc = ptper * duty cycle / 100.
Now my confusion is the pwm resolution. What exactly is this, should i calculate everytime. Please advise.
Resolution is the number of steps (e.g., duty cycle values) allowed between the lowest value (often 0% ) and the highest value (often or close to 100%).
Iam bit confused with pwm resolution in pic controllers. Generally i am using the following equation to calculate ptper reguster
Frequency of clock/ pwm frequency = ptper value. The duty cycle is loaded based on the value of ptper value
Pdc = ptper * duty cycle / 100.
Now my confusion is the pwm resolution. What exactly is this, should i calculate everytime. Please advise.
You can think of resolution like the number of segments needed for the 'period' of time, so for 10 bit there are 1024 segments.
A 50% duty cycle means that for 512 segments the signal is on and for 512 segments is off.
If you perfectly low-pass filter the PWM signal to a DC level, and the PIC is powered with 5.000Vcc, then you get 1023 = ((2^10)-1) equal steps from 0V to 5.000V*1023/1024 = 4.995V. The step size is 4.995V/1023 = 0.00488V