Question on PIC PWM resolution

Status
Not open for further replies.

eblc1388

Active Member
I can't understand how the 5.5 bit resolution result in the image is calculated.

For PR2=0x17, that's 10111 in binary. Adding the two bits in CCP1CON to the right results in 1011111, which is the max possible value for duty cycle.

Therefore the possible value of duty cycle ranges from 0 to 1011111. But why is this 5.5 bit resolution?
 

Attachments

  • pic_pwm.gif
    5 KB · Views: 188
Would 6.5 make you happier?

The expression should be log_base_2(96) = 6.58
96 is the number of possible values you get in the range [00.5F]
 
Papabravo said:
Would 6.5 make you happier?

The expression should be log_base_2(96) = 6.58
96 is the number of possible values you get in the range [00.5F]

Thanks for the clarification.

This "5.5 bit resolution" information appeared in Microchip datasheets and both the 16F and 18F Reference Manuals spanning several years(1997~2001) so I thought I better ask.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…