PIC microcontrollers are one the popular and basic microcontrollers. Based on importance and usability, I started this series of tutorials on ‘Learning PIC Microcontrollers Programming in C’. This series will cover from A-Z to learning both PIC microcontrollers and programming easily. In this chapter, you are going to learn about the compiler mikroC Pro for PIC and how to create a new project in mikroC. So let’s start!
⚠️ Disclaimer ⚠️
Working with electricity involves serious risk. Ensure you have the necessary skills and take proper safety precautions before attempting any electrical projects. Proceed at your own risk — the author assumes no responsibility for any damage, injury, or issues resulting from the use or misuse of the information provided.
All content on this website is original and protected by copyright. Please do not copy or reproduce content without permission. While most of the resources shared here are open-source and freely accessible for your learning and benefit, your respect for our intellectual effort is appreciated.
If you find our tutorials helpful, consider supporting us by purchasing related materials or sharing our work — it helps keep the content flowing.
Need help or have questions? Leave a comment below — the author is always happy to assist!
Table of Contents
Last chapter in short:
In the previous chapter, we have seen what software we need to install. How to download it and also some details about that. If you miss the last chapter, you can read it here, Chapter 2.

Compiler window:
After installing the mikroC pro for PIC open the software. You will find a window like my one:
Note: the theme may not open this but the default one. You can configure the theme later on from Tools>>Options>>Editor Colors
This is optional for you, it depends on your choice of which theme you want to keep. But let’s go ahead with the important parts.
Creating a project in mikroC:
To create a new project in mikroC, click on the start page >> New Projects

Alternatively, you can do this from Files>>New>>New Projects

Afterward, it will ask for the name, directory, MCU, clock, etc

You can give any name without space, special characters, symbols, etc but like I’ve given in this image. Also, select a directory and create folders for individual projects. Then select the device. Here, I’m selecting PIC16F73 (P16F73). Then the crystal oscillator value you want to use in the project.
Now go to the next step clicking ok.
If your project configuration settings option is marked, it will redirect you to that page where you can edit the project configuration register.

Here, you can set the type of Oscillator. Usually, we use an HS oscillator. But if you use an RC oscillator, you can select that from here. Then if you want to use Watchdog Timer you can edit that. The FLASH Program Memory Code Protection is the protection to prevent copying the uploaded hex file from the MCU. If this selection is enabled, no one can read the MCU files.

Main code window:
Click ok and it will redirect you to the main code window where you can write the code.
On the top portion, you will not find any comments or signatures written. You need to do that yourself. And the meantime it may ask to save the project, simply do it.
On the top portion, you’ll get a button to build the project which will compile your code and generate a *.hex file that you can use for the microcontroller.
Note: in default or just after installation, you may not find all the buttons on the status bar. You can view that from View>>Tool Bars
You can select as I did here. Also some drag and drop works in the toolbar section. You can arrange it as you like.
Writing the code in MikroC:
Now, our compiler is ready to write the code and do something.

It’s a good practice to keep comments using ” //comments… ” beside code lines. And also should comment on each function end, this will help you find anything easily.
In the next chapter:
Now we are ready to write our codes. And this chapter ends here, we will continue writing our first code in the next chapter. If you miss the previous chapters, you can read those from the below list.
Read more on:
- Learning PIC Microcontrollers Programming in C: Chapter 1
- Learning PIC Microcontrollers Programming in C: Chapter 2
- Learning PIC Microcontrollers Programming in C: Chapter 4
Also, if you are capable of buying the license, I suggest getting either a dongle license or a code license. Because using any illegal activators is not good. Also, this compiler gives you the option to practice small projects. But if you are ready to earn money, better to get a valid license.
I’ve been using a dongle license since 2012.


Liked this article? Subscribe to our newsletter:
or,
Visit LabProjectsBD.com for more inspiring projects and tutorials.
Thank you!
1 Comment
Enrique · 24/07/2023 at 5:30 pm
Muchas gracias, excelente trabajo,