Can't get PWM to work on a PIC12F683 using MPLAB XC8
A few issues I see:

T2CONbits.T2CKPS = 0x1; // set prescaler to 1


This line is actually setting the prescaler to 4, not 1. Based on the values you have chosen for PR2, Tosc and the TMR2 prescaler I calculate a PWM frequency of 4902 Hz. If you set the prescaler to 1 you should get a frequency of ~19608 Hz. I think this is what you intended. You should write 0b00 to T2CONbits.T2CKPS instead.

Also the PWM duty cycle is set by a 10 bit value. The equation for duty cycle ratio is:    


  Duty Cycle Ratio = (CCPR1L:CCP1CON&lt;5:4>) / (4*(PR2 + 1))


To achieve 100% duty cycle you need to write 408 (or 0x198), not 255.