Is MPLAB X Any Good?

I am an occasional user of MPLAB because we mainly use AVR microcontrollers in our products but recently we have done a lot with PIC microcontrollers. This gave the opportunity to compare MPLAB 8.70 and MPLAB X to decide which to use in the future, so we thought we would share our findings with you.

Microchip still distribute MPLAB 8.70 CDs with PICKit2 and PICKit3 debugger/programmer tools, which we use in our PIC training kits, so it looks like we should stick with this. However, this CD has a bug with auto-run that means you have to install manually by running setup.exe. You also have to do a custom install to remove C32 Compiler as this gives a corrupt cab file error. Not a great user experience!

This CD contains Hi-tech C compiler that is installed as part of MPLAB but the version of 8.70 that can be downloaded from Microchip seems to omit this. This means you have to also download the new Microchip XC compiler as well. The good news is that this can be used with MPLAB 8.70 and this one compiler supports PIC12, PIC16 and PIC18 series.

Having gone to all this trouble to install MPLAB 8.70 with a working C compiler, wouldn’t it be easier to just download and install MPLAB X? It might be a 370MB file plus another 155 MB for XC compiler but most of us have reasonable downloads now.

We bit the bullet and downloaded it, without any problems once we worked out that we needed XC8 version of the compiler – it is a bit lost on a complicated downloads page.

First impressions were good. It has a nice layout and windows dock properly. It also runs smoothly on fairly slow PCs, which is more than can be said for Atmel’s AVRStudio 7!

As all our code is in MPLAB 8 format, the first step was to see how easy it is to convert existing projects and we were pleasantly surprised. You just choose File -> New Project and select Existing MPLAB IDE v8 Project. Then select device, debug tool and assembler or C compiler.

There is no Build or Project menu, which was surprising but we found Build and Clean in Run menu. Assembler files build without any issues as you can select mpasm as the assembler so we could just save the new MPLAB X project.

C projects gave issues with Configuration Bits as the XC8 compiler doesn’t support __CONFIG or CONFIG directives. Instead it uses the #pragma config directive. It is actually easy to generate these once you have found the tool that does it, as it is well hidden in Window menu -> PIC Memory Views -> Configuration Bits. Otherwise, they all built fine.

Here is a list of the annoying quirks we found in MPLAB X:

  • Build is under Run menu
  • To close a project, you need to highlight it first in Project window
  • With New Project, it won’t create a new folder
  • New empty files aren’t found unless you manually add a file extension, .c or .asm
  • Output Window isn’t cleared when you change project and gets cluttered – right click to clear it
  • No Animate in Debug

These are minor issues and you soon get used to them. In conclusion, we have swapped to MPLAB X with all our PIC microcontroller kits for these reasons

  • MPLAB 8.70 CD is buggy
  • MPLAB X supports both PICKit 2 and 3
  • MPLAB 8 projects convert easily
  • XC8 Compiler is easily integrated and supports 12,16 and 18 series
  • Support and licence for Hi-Tech C compiler seems to be going
  • User interface is better
  • It installs a separate programmer utility on desktop
  • It runs fine on slower PCs

All in all, now seems to be a good time to swap even though Microchip are still distributing MPLAB 8.70 with their tools. Our PIC microcontroller programming kits all use MPLAB X now and XC8 compiler.

Our latest PIC starter kit uses the latest PIC16F1789, which is much better than older PIC chips like PIC16F877. It has tutorials and sample code on all aspects of using MPLAB X, writing programs in assembler and C and much more.

PIC Microcontroller Programming Kit
Latest PIC Microcontroller Training Kit

Microchip MPLAB X and XC8 Compiler Downloads

MPLAB X Download Page

XC8 C Compiler Download

6 thoughts on “Is MPLAB X Any Good?”

  1. There is (or was about a year ago I believe) a problem in XC as some libraries and examples from Microchip have not and, it seems, will not be ported to the new compiler. This includes the USB libraries.I do not know if anything has changed since then, but at the time there seemed to be quite a few people upset with Microchip on forums about this and there was nothing coming out of Microchip about it, even in the face of direct questions.

    1. All the semiconductor companies seem to have this attitude – if we ignore the complaints, they will go away. They do tend to do something about it in their own sweet time if it isn’t too much trouble but you would have thought that having someone give an answer would be good customer relations. The problem, I believe, is down to Marketing and Communications departments who want absolute control over all messages from the company so an engineer who could give an answer isn’t allowed to.

      I believe that Microchip have now ported USB libraries but they haven’t moved all older libraries and examples to XC compiler. But they are certainly only supporting MPLAB X and XC compiler with current libraries although legacy projects are available. For more information, see Microchip Library for Applications (MLA)

  2. What you say may be well and good, if you are using MPLAB X and XC8 on a modern very fast PC. They are HUGE and even when not being used manage to slow down an XP SP3 PC noticably. The real fun comes when you try and use PICKIT3, which most noobs, students and poor people will try to use to program the PIC. It plane doesnt work. I have spent WEEKs trying. USB problems, PICKIT not found messages, connection errors etc. Round and round you go. There are no error message manuals. The messages dont have message numbers. You cant look them up. The support is useless. You have been warned. Unfortunately ATMEL Studio 6 doesnt seem any better from what you say.

    1. Hi
      It is all opinion but you are correct that you need a pretty fast PC. It was mostly the problems with MPLAB 8.7 CD supplied by Microchip that made us change our kits to use MPLAB X as we were getting endless tech support problems with this. MPLAB X and Atmel Studio 6 will both slow down an old XP machine even when not being used as you say but it was a case of being caught between the devil and the deep blue sea with a bad Microchip CD that comes with PICKit3 or a piece of bloatware.

      That being said, we haven’t seen the problems you report with PIKit3 or PICKit2 for that matter, on MPLAB X. Maybe this is related to the speed of the PC or USB driver problems on XP as support for XP USB drivers is getting a bit flaky since 8.1 was released as it is hard to design a driver that effectively supports both properly.

      We tend to use the separate programming utility, MPLAB IPE v2.15, for programming with PICKit3 rather than run from MPLAB X itself. Have you tried this instead?

      1. I\’ve given up with PICs. I\’m wasting hearbeats on it. Its just to much hassle. For an amateur, all of the MicroChip software is abysmally documented. The MicroChip website a a maze of confusion. All of the manuals describe the features, but not why you need them, nor how to use them. I cant comprehend how a C compiler needs 875Mb of space. In my professional capacity as an IBM mainframe applications programmer I have loaded Ansi cobol compilers off a single 1.44 floppy in the past, and a comprehensive development environment (ISPF/PC) from another.With regard to PicKit3, just do a google search for \”PicKit3 not found message\” and it will take you to Microchips own user forum, or checkout forum.allaboutcircuits.com and another dozen blogs and sites all saying the same thing.Anyway I\’m going to give ATMega328 chips a try, but NOT going the Arduino route. Do you have any recommendations for a simple to use programming (software) environment (other than notepad) , C compiler, chip loader and most importantly single step debugger (similar toIBM mainframe Xpediter).Thanks for your help.

        1. Yes, bloatware seems all the rage. Atmel have gone the same way with Atmel Studio 6 except I think it is about 750MB! AVRStudio 4 will still work nicely and it is what I use all the time. This has WinAVR C compiler built-in but you want to use AVRStudio 4.18 and Service pack 3 not last version, 4.19, as this has a bug where it looses the C tool chain. Here is a link to one of our blog posts on AVRStudio that tells you where the software is.:

          AVRStudio Explorered

          AVRStudio will run an Atmel programmer and debugger called AVRDragon that can single step or act as a programmer from the AVRStudio environment. It is much more reliable than PICKit3.

          A last option is IAR Workbench. This is an excellent C compiler and development environment. It is very expensive but there is a free version called Kick Start that is limited to 4KB output code on C compiler but unlimited on assembler. It is a much better compiler than WinAVR and you can run AVRDragon emulator from this environment. but they call it DragonAVR for some reason. Here is link to IAR download page:

          IAR AVR C compiler

          Finally, have a look at our STK200 Dragon kit, which has all the above plus books on CD, hardware board and lots of sample code

Leave a Reply

Your email address will not be published. Required fields are marked *