jruibarroso
Joined: 07 Jan 2006 Posts: 64 Location: Braga
|
Can Timer1 be used to PWM on CCP1 / CCP2 ? |
Posted: Fri Nov 17, 2006 11:31 am |
|
|
I'm using this on a PIC16F877 :
void main() {
setup_timer_2(T2_DIV_BY_ 1, 130, 1); // 38KHz
setup_ccp1(CCP_PWM);
setup_ccp2(CCP_PWM);
set_pwm1_duty(DutyVariable1); // 1 to 99 duty cicle
set_pwm2_duty(DutyVariable2);
But as far as I know , TIMER2 only handle 8 bits. Can i use TIMER1 insted to use it 16Bit resolution ? |
|