In this tutorial we explained how to control a servo motor with PIC Microcontroller (PIC16F877A) using MPLAB and XC8.