hey sorry again,

getting the right ideas but im a little stuck on one bit...

i need to set the PWM period by writing to the PR2 register and then set the PWM duty cycle by writing to the CCPR1L register and CCP1CON<5:4> bits. would this require assembley language and how would i do it?



afterwards i need to make the CCP1 pin an output by clearing the
TRISC<2> bit. would that just be trisc.2 = 0 ?


also i need to set the TMR2 prescale value and enable Timer2
by writing to T2CON. but im not too sure on how to work out the prescale value? and how to write to it?
and i need to configure the CCP1 module for PWM operation, how would i decide upon specific configurations? leave it as standard config until i find there is a problem then try and sort out the config?

will this give me hpwm? since i cant find anywhere in the datasheet that its hardwarepwm, but i am presuming it is since its whole purpose seems to revolve around pwm outputs and ccp.

additionally if i am updating the pwm constantly as it is giving an output... will this cause any delay in the output? for example when it updates... there will be a significant pause in the pwm?