Have you ever used K150 PIC programmer with MPLAB IDE? Did you face any issues while programming a PIC microcontroller? Actually, I have faced several issues. So I have decided to write this post to help others.
In this post, I will be discussing the issues caused by k150 PIC programmer while programming PIC microcontroller and its solution.
Recently, I bought PIC K150 programmer. It is one of the low-cost PIC microcontroller programmers that support 10, 12F, 16F 18 series. To test this, I wrote a simple test application using MPLAB v8.33 that can blink an LED interfaced to PIC18F4550 microcontroller.
I have downloaded K150 software from this link http://www.kitsrus.com/zip/DIYpack25ep.zip, and extract DIYpack25ep.zip. Folder structure is shown below
In the extracted, microbrn.exe is the programmer software.
Real problem started when I was programming the PIC microcontroller.
What was the issue with K150?
After generating a hex file using MPLAB v8.33 IDE, I loaded it to ‘microbrn’ software. Soon after loading HEX file, a pop window appeared with the below error.
“Error in HEX file – FUSE Line 31 :0100000024DB”.
As per the goolge’s suggestion, I understood that HEX file needs to reformat with ‘fixhex2’ application (which is available in k150 software folder it self (DIYpack25ep.zip)).
I generated a new HEX from the mplab generated hex file using ‘fixhex2’ and loaded to ‘microbrn’ software. This time, HEX file loaded without any issues, but ‘microbrn’ software didn’t detect fuse bits configured in the test application program. Below fuse bits were configured in my test application.
#pragma config PLLDIV = 5, CPUDIV = OSC1_PLL2, USBDIV = 2
#pragma config FOSC = HS, FCMEN = OFF, IESO = OFF
#pragma config PWRT = OFF, BOR = OFF, VREGEN = OFF
#pragma config WDT = OFF, WDTPS = 32768
#pragma config MCLRE = ON, LPT1OSC = OFF, PBADEN = OFF
#pragma config STVREN = ON, LVP = OFF, ICPRT = OFF, XINST = OFF
But microbrn software was showing different fuse configurations as shown below.
I left with no choice, every time I was changing the fuses manually and programmed the PIC controller. Few days later, I started searching for an alternate solution. After a deep web search, I found that MPLAB IDE has the solution for this issue.
Compleate Sollution : Flash PIC microcontroller using PIC k150 programmer
To accomplish programming PIC controller, I am explaining a sequence of steps to be followed (Assumed that you have successfully compiled code and generated the HEX file using MPLAB IDE)
Step 1: After compilation, click on File –> Export. A pop window appears as shown bellow.
Step 2: Click OK.
Step 3: Save as the HEX file with same or different name.
Step 4: Connect PIC k150 programmer to the computer.
Step 5: Open ‘microbrn‘ software.
Step 6: In ‘microbrn’, click file -> Port and choose COM port.
Step 7: Select Microcontroller variant (Chip Selector). In my case, it is PIC18F4550.
Step 8: Click Load and load the exported HEX file.
Step 9: Click verify to cross check fuses.
In my case : Fuse configurations are same as my test application Fuses. Check the below image.
Step 10: Now, click ‘Program’ to program the PIC microcontroller
So far, I haven’t faced any other issues.
Since, support to this programmer has stopped 10 years ago, it’s not recommended to buy this one.