Top 3 PIC C Compiler

Hello friends, hope you all are fine and having fun in your lives. Today, I am going to share Top 3 PIC C Compiler. We all know about PIC Microcontrollers because of which now we can quite easily add complex automation in our projects. So, today, I am going to share C compilers for PIC Microcontrollers. When an engineer starts working on some engineering project then he must have to choose a microcontroller. PIC is most commonly used Microcontroller in engineering projects. So, now when you have selected that you are gonna use PIC Microcontroller in your project then there comes a need which compiler to use for designing programming code for PIC Microcontroller.

It's quite a difficult as well as important decision because I have seen that once you started working on some compiler then its quite difficult to switch from that compiler to any other compiler. The reason is, you have to first learn that compiler and then you start designing your codes on it and after learning one compiler you don't want to learn any other compiler. So, today I am going to share a List of PIC C compiler which are quite useful and I consider them the best compilers for PIC Microcontroller. Before going into details, lets first have a look at what is compiler.

What is Compiler ???

  • In the start when microcontrollers were newly introduced, they were programmed in Machine language which is in the form of 0 and 1. We can also call it binary language. So, programming a microcontroller in machine language was quite difficult so designers did some research and they cme up with the idea of assembler.
  • In assembler we write programming codes for Microcontrollers in assembly language then function of assembler is to convert that assembly language code into machine language and create the hex file and then we upload that hex file in our Microcontroller. But, if you have worked on assembly language then you must have the idea that assembly language is also not much easy and you have to write a lot of code just to perform a simple task and then researchers did some more work and finally they invented compilers. (Thanks a lot to them :D )
  • Now in those compilers, we write our code in C Language and then these compilers convert those C Language codes into machine language and we get our hex file which is then uploaded in any microcontroller like PIC, Atmel, 8051 Microcontroller etc.
  • Using compilers, the programming has become quite easy, we have ready to use libraries in these compilers using which we can do complex to complex tasks in just 2 to 3 lines.
  • Now in different compilers the back end generated machine code is almost same but the front end C coding syntax is quite different. For example if you are working on LCD then it has different commands for printing in different compilers. So, that's why I mentioned earlier that if you are working in one compiler then switching to another compiler is quite difficult as in that case you first have to learn the syntax of that second compiler.
  • There are lots of C Compilers available in market using which we can quite easily write our programming code. For different microcontrollers there are different compilers and today, I am going to share compilers for PIC Microcontroller. So let's get started with it.
Here's the list of PIC C Compiler,which we are gonna discuss in detail below:
  1. MPLAB C18 Compiler
  2. MikroC Pro for PIC
  3. CCS Compiler

Top 3 PIC C Compiler

As the topic indicates, today I am going to share top 3 PIC C Compiler. These compilers are best compilers for PIC Microcontroller. I have worked on all 3 of them and that's why I have quite an idea that all of them are best compilers. They have their pros and cons but still you can work on any of them. You can say this list is a result of my 5 years hard work. :) So, let's get started with them:

1) MPLAB C18 Compiler
  • MPLAB C18 compiler comes at top in the list of top 3 PIC C Compiler as its the best one in the series. MPLAB is an official software developed by Microchip for PIC Microcontroller.
  • It is free to use and you can download it from official site of Microchip.
  • First of all, you need to install the MPLAB software so you should read How to install MPLAB software in Windows.
  • Once you installed the MPLAB software, then you should install the MPLAB C18 Compiler so you should read How to Install MPLAB C18 Compiler in Windows.
  • In MPLAB you can work on assembly language as well but using the C18 compiler you can write your code in C Language.
  • MPLAB is the most flexible compiler for PIC Microcontroller as you can do anything in it with you PIC Microcontroller. But its a bit difficult to learn and program as in MPLAB you have to set every bit on your own.
  • When I started my programming career, then I first started working on this compiler as I like it the most.
  • So, if you want complete grip on your project then this is the compiler for you.
  • If you are interested in working on this compiler then you should also read Getting started with MPLAB software.
2) MikroC Pro for PIC
  • MikroC Pro for PIC comes at second place in my list of top 3 PIC C Compiler.
  • Its not free but has a student version using which you can compile your up to some limit. If the size of you code exceeds that limit then you can't compile your code using it.
  • Its also one of my favorite compiler because of its easiness and user friendly environment.
  • MikroC has a long list of built in libraries using which you can quite easily perform your tasks.
  • Its not much flexible but is very user friendly, it gives you all the setting in hand and you can set them just by clicking some combo boxes.
  • These days, I am working on this compiler because its easy to use and you have a great team at its back which gives you great support. So, if you ask me then I will recommend this PIC C Compiler.
Note: Here are few projects designed in MikroC Pro for PIC Compiler:
3) CCS Compiler
  • CCS Compiler comes at third place in PIC C Compiler list.
  • I have used it in some projects where there was a restriction to use this compiler.
  • Its a bit difficult to learn and program because of its pure C style syntax but also has a great list of libraries with it.
  • If you have already worked on C Compiler for windows then I think this one is best for you as the syntax is almost similar and you can learn it easily.
That's all for top 3 PIC C Compiler. I hope you have learn something out of it. Let me know if you have any comments and I will reply you.

Installation of MPLAB C Compiler

Hello friends, hope you all are fine and enjoying good health. In today's tutorial we are gonna have a look at Installation of MPLAB C Compiler in Windows. In the previous part of this chapter, I have explained How to install the MPLAB software in Windows, that part was not much tricky and we did very easily and our software was then ready to use, but as we didn't install the C compiler so we can't do C programming for PIC Microcontroller on MPLAB. We can only do assembly programming on it. Now in this post I will teach you how to install MPLAB C18 compiler so that we can do programming of PIC in C. There are many different compilers available in the market, one of them is MikroC and another famous one is CCS but they are paid compilers means you have to buy them, in order to work on them. You should also have a look at Introduction to MPLAB Compiler.

Although they provide some demo version as well which has some limit of hex size. Why MPLAB is better than MikroC or any other compiler is because it is very flexible. You can change any bit of your Microcontroller in MPLAB but this thing isn't possible in other compilers. But on the other side it also more difficult than other compilers. MikroC has builtin libraries using which you can save quite a lot of time. Suppose you wanna run LCD, then in MikroC you just need to write 2 lines but in MPLAB there will be quite a lot code lines need to be written. Here's a comparison of Top 3 PIC C Compilers. So, anyways its just a little comparison, now lets come back to our tutorial and start with Installation of MPLAB C Compiler.

Installation of MPLAB C Compiler

  • The software has already been emailed to all the subscribed members. If you are not subscribed yet then get subscribed and it will be emailed to you as well.
  • Open the rar file and you will see there are two folders in it, this time open the second folder named MPLAB C18 F and run the exe file in it.
  • The next screen appears will be like the below image. On this step click Next.
  • Now the below image will appear, click on I Accept and then click Next.
  • Browse for the location where you want to install the compiler but i will recommend to install it in the C so don't change the location.
  • Now don't change any option and just click Next again as shown in below image:
  • Now here comes the real part, check all the boxes as shown in below image, they make the work easier and while making a project you don't need to add them manually.
  • Again you will come with four option and do the same thing check all the boxes as shown in the image below.
  • Now simply click on Next.
  • And finally your software will begin to install.
  • When the installation process is completed , uncheck all the options and just click on the finish button and your C compiler is now ready for use.

Advice

  • Always install the MPLAB software first and then the C compiler. Actually C compiler links itself with the MPLAB software so it will become very handy for you.
  • It seems like a lengthy proces but in actual its not, just a few clicks and you are done.
I hope you have enjoyed today's tutorial and now can easily install MPLAB C Compiler for PIC Microcontroller. Will meet you guys in next tutorial. Till then take care & have fun !!! :)
Syed Zain Nasir

I am Syed Zain Nasir, the founder of <a href=https://www.TheEngineeringProjects.com/>The Engineering Projects</a> (TEP). I am a programmer since 2009 before that I just search things, make small projects and now I am sharing my knowledge through this platform.I also work as a freelancer and did many projects related to programming and electrical circuitry. <a href=https://plus.google.com/+SyedZainNasir/>My Google Profile+</a>

Share
Published by
Syed Zain Nasir