Update,
I realized that I was setting the two duty cycle registers wrong. It should be 127 for 50% so I think they should be set like this:
TRISC = %00000010 ' Set PWM bit 1 for input during setup
CCPTMRS0 = %0000000 ' Set CCP1 to use Timer2
PR2 = %00000111 ' Set Timer2 counter to 7
CCP1CON = %00111100 ' Set to PWM mode and 2 LSB bits of duty cycle
CCPR1L = %00011111 ' Set MSB of duty cycle
T2CON = %01000101 ' Set Prescaler to 1 & turn on PWM
TRISC = %00000000 ' Set PWM bit for output to enable PWM
With these changes there is still no output at all.
-Tim




Bookmarks