Hello Friends, Welcome back. In the last tutorial we started working with MPLab and HI-TECH C Compiler and written our first C program to blink LED. After compiling the program we got the HEX file. Now, in this tutorial we will see how to transfer(burn) the hex file to our Microcontroller chip and then power it up to actually blink the LED.
We will use eXtreme Burner – PIC , which is a easy to use GUI programmer for PIC18 MCUs. The burner supports USB connectivity with PC so it is very easy to install and use.
Launch eXtreme Burner – PIC from Windows Desktop or Start Menu.
Fig.: eXtreme Burner – PIC, Main Screen. |
The software is easy to use. First you need to load the HEX file which was generated by MPLAB+HI-TECH C in previous tutorial. So select Open from File Menu or From the Toolbar. Then select the hex file. Now the HEX file will be loaded and the contents (FLASH,EEPROM,Chip Settings) will be available.
Now connect the programmer with your PC by using standard USB Cable the programmer will be automatically detected by software (provided drivers are installed previously) . Apply power to programmer using a 12v DC adaptor. Place a PIC18F4550 chip in the ZIF socket and lock it.
Fig.: eXtreme Burner – PIC, USB Programmer for PIC Micros. |
After that select PIC18F4550 from Chip Menu and Programming Mode = ZIF Socket from Settings Menu. You are now ready Burn !!!
Select Write All From Toolbar or Write Menu.
The burner will start the Burn Process. It will write each section of memory and verify that they are written correctly.
Fig.: eXtreme Burner – PIC, Burning in Progress. |
After few seconds the process ends. The chip is now programmed with the provided HEX file contents. The chips settings have also been modified to suit the hardware environment we will be using. These settings were also embedded in the HEX file (more on this topic in latter tutorial). And it got into the HEX file from the C file. Notice the two lines
__CONFIG(1,0x0F24);
__CONFIG(2,0X0000);
in the C file of previous tutorial.
The chips is now ready for some amazing lighting effects !
Get the following to see that in action
- A Breadboard.
- A 20MHz Crystal
- 1 x 330 Ohms resistor
- 1 x 4.7k resistor.
- 2 x 22pF Ceramic Disk Type Capacitor.
- A LED
- Some Bread boarding wires (free if you buy Breadboard from above link)
Go ahead and connect them like this.
Fig.: A Simple LED blinker project using PIC18F4550. |
Fig.: A Simple LED blinker project using PIC18F4550 in a breadboard. |
Time to power it up to experience a hi tech led blinking demo!
Apply a regulated 5v supply using a 7805 chip. If you have done all wiring correctly then the led will start blinking. Please do not apply more that 5v or supply the power in reverse direction, because it will fry your chip within seconds!
So now you have made your first project with PIC micros and you know all the basic steps and the tools required for them. You are now ready to learn and experiments with these chips
Facing problem with your embedded, electronics or robotics project? We are here to help!
Post a help request.
Pingback: Hello World Project With PIC Microcontroller - Part I | eXtreme Electronics
Looking forward to see the next tutorial…Thanks
Hi!
Is it possible to get this working without Crystal?
Isn’t there some internal crystal in PIC?
Yes, Im beginner 😀
Yes, there’s a internal RC oscillator. For THIS application and similar apps ONLY! it works using it. u must configure the registers properly.
Pingback: RS232 Communication using PIC18F4520's USART - PIC Microcontroller Tutorial | eXtreme Electronics
Pingback: Interfacing LM35 Temperature Sensor with PIC Microcontroller. | eXtreme Electronics
I’m impatient for the next tutorial too 🙂
Sir, I can see Some Six pins at jumper J1 on eXtreme PIC burner LITE . Please describe some details for the same.
How is jumpur setting and what config for what IC.
Thanks for the Tutorial.- Paseka(South Africa)
Mr. Avinash,
Can you please explain about config. parameters “_CONFIG(1,0x0F24);
__CONFIG(2,0X0000);
Will it be same for pic 16f877 , 16f628A micro controller.
and how to use internal oscillator of pic micro controller for led blink.
regard,
Uttam
It is pity that eXtreme Burner is not support PIC12F series.