Pulse Width Modulation (PWM) generate an analog output waveform from microcontroller output pin. Enhanced Capture/Compare/PWM (CCP1) peripheral of PIC16F887 is able to generate analog output signal.
Block diagram of PWM module of CCP1
There are some related registers of SFR to configure in program to make PWM work. However in MikroC, there is a PWM library for this peripheral. In this post we will make this module work first without making any complication with SFR.