In developing softwares for PIC Microcontrollers, the first thing that should be done is to prepare the PIC’s development environment. Your PC should already be installed with the IDE used for compiling hex images of the software. And then a programmer or in-circuit emulator is already at hand to download the software image to the PIC microcontroller.
Here are the steps to setup a development environment for PIC Microcontroller using Microchip’s MPLABX IDE:
Download the MPLABX IDE from Microchip.com
1. Go to the download page of MPLABX IDE
2. On the bottom part of the page, select the Downloads tab.
3. Based on your operating system, download the appropriate installer.
Install MPLABX IDE
Download MPLAB XC Compilers
1. Go to the MPLAB XC Compilers download page.
2. On the bottom page, select the downloads tab.
3. Depending on the PIC Microcontroller that you will be using for the development, select the compiler that you need. If it is an 8-bit PIC MCU then select XC8, if it is a 16-bit PIC MCU or dsPIC then select XC16. Lastly if it is a 32-bit PIC MCU, then go ahead and download the XC32. Or you can download and install the three compilers.
Install MPLAB XC Compilers
For the purpose of demonstration, MPLAB XC8 Compiler installation will be shown in this section. The installation for XC16 and XC32 will be closely the same.
We will only be using MPLAB XC8 Compiler’s Free License.
Since we will be using the MPLAB XC Compiler’s free license, we can leave it as it is. However, if you have a license then go ahead and activate it in this step.
Confirm the installed compilers in MPLABX IDE
To confirm that the MPLAB XC8 Compiler is installed successfully. Then we check it in MPLABX IDE.
Launch the MPLABX IDE
Go Tools → Options
Then in the Options Window, select Embedded. Under the toolchain box, we should see XC8 as the listed compiler.
Your PIC Development Environment is now ready for action!