My datasheet has the following formula for the CCP peripheral in PWM mode.
PWM Duty Cycle = (CCPR4L:CCP4CON<5:4>) •
TOSC • (TMR2 Prescale Value)
What is TOSC exactly? Does this reference my main OSC? Or is it the timer?
My main OSC is running at 8MHZ.
The value I set PR2 to is 255.
I am using a prescaler of 1 (T2CKPS is set to 0).
What values are entered here?
Speaking of PR2, I see it referenced but I am not seeing where it is defined in the datasheet. My chip is the PIC18F47J53.
How do I determine optimum values of PR2 and the prescaler?
PWM Duty Cycle = (CCPR4L:CCP4CON<5:4>) •
TOSC • (TMR2 Prescale Value)
What is TOSC exactly? Does this reference my main OSC? Or is it the timer?
My main OSC is running at 8MHZ.
The value I set PR2 to is 255.
I am using a prescaler of 1 (T2CKPS is set to 0).
What values are entered here?
Speaking of PR2, I see it referenced but I am not seeing where it is defined in the datasheet. My chip is the PIC18F47J53.
How do I determine optimum values of PR2 and the prescaler?