PWM for PIC16 devices is done through the CCP module. In this tutorial, I have created a C function that sets up the PWM frequency and duty cycle.