In this tutorial we will learn how to convert a PIC GPIO pin into a PWM pin and to test it we will simulate it on proteus with digital oscilloscope and also control the position of Servo motor using the PWM signal and vary its duty cycle by varying a potentiometer.