Hi Team,

I am using the setup from post #43 and I need a clarification on how the duty cycle setting works.
If I understood the data sheet correctly for a 16 MHz main clock and an output frequency of 250 KHz I have access to 16 steps of duty cycle.
Also the manual states that you can use CCPR1L which is 8 bit wide and CCP1CON.5 plus CCP1CON.4 so you have access to a 10 bit wide setting.

My question is who keeps track of individual values and their place in the 10 bit variable.
Is the user supposed to do the logic or PBP takes care of it?
For example if I use something like this:

CCPR1L = 5
CCP1CON.5 = 1 (an 0 means 0 and an 1 means 2)
CCP1CON.4= 0 (an 0 means 0 and an 1 means 1)

Is the result 7 so we just add the two values or is it 21 which comes from 5 shifted twice and add 2 from CCP1CON.5 ?

Does one have to pick only multiple of 4 when choosing CCPR1L or whatever value is given is taken as a 10 bit value and added to CCP1CON 4 and 5?


Regards,

Nick