
Setting the configuration bits wrong or forgetting to set the bits is the first and foremost mistake everyone makes. If you don’t setup the configuration bits or if it set wrong, then the microcontroller will not execute anything. Next step is to create configuration bits.

Which means we will be adding files to make it work. Now we have successfully created a project and this is how the project tab will look like.

Here is the picture of the board I’m using (makes your life a lot easier).Īssuming you have installed the latest version of MPLABX and XC8 compiler, you can start a new project by following the screenshots. The site has many more goodies for an electronics hobbyist. The hardware/prototyping board I’m using is from ( ). If there is any difference, I’ll let you know. I am using PIC18F4550 and PIC18F46K22, 40 Pin DIP/PDIP package. As the title say’s, that’s your compiler guide.
#Mplab xc8 setting config pdf
If you were having success till now, you are at the mercy of your luck.Ģ) Read Datasheet – If you did not read the data sheet, then don’t call yourself someone who has used microcontrollers.ġ) You know basic electronics (ohm’s law, transistors, etc.)Ģ) You know logic gates and digital circuits.ģ) You know some C, the programming language (yes, we will be doing a lot of C and of course pointers)Īlso please download this pdf titled “Microchip XC 8 Compiler User’s Guide” ( ). So use this as a guide/tutorial.ġ) No bread board – bread board for microcontrollers is a fiasco.
#Mplab xc8 setting config series
I have taken a long time in drafting this whole series and I want to put my time writing it down. Yeah, the last link is for some problems you might be facing. Problems, “Not working” a.k.a FAQ type questions : Given below are the links that you should visit before further reading. I wanted to start this article by starting a new project and go on, but Microchip has already done a nice job. Then you move on to XC16 for 16 bit and XC32 for 32bit controllers. Unlike previous Microchip C Compiler (known as MCC18 – for 8 bit) which allowed only PIC18 series, now they cover from PIC10 up to PIC18. MPLAB X is Microchip’s new (relatively) IDE and XC8 is the new (remember HI-TECH C compiler) C compiler for the 8 bit controllers.


MPLAB XC32 - C/ C++ compiler for 32-bit MIPS-based PIC32 and ARM-based SAM devices.MPLAB XC16 - C compiler for 16-bit PIC devices.MPLAB XC8 - C compiler for 8-bit PIC and AVR devices.MPLAB X supports the following compilers: MPLAB X is the first version of the IDE to include cross-platform support for macOS and Linux operating systems, in addition to Microsoft Windows. MPLAB X supports editing, debugging and programming of Microchip 8-bit, 16-bit and 32-bit PIC microcontrollers. MPLAB X is the latest version of the MPLAB IDE built by Microchip Technology, and is based on the open-source NetBeans platform.
