PICkit 2 automator

Since I made my first mod to the PICkit 2 applet source, Microchip completely rewrote the applet. They use .NET, which I consider to be pretty much a virus, but I was considering getting all the MS development tools installed and getting up to speed with C# to work with it.

But then I realized that it would be simple to just automate the existing applet with an external program, and that would mean I wouldn’t have any changes to integrate into the Microchip source (as well as not having the dreaded MS tools installed).

So the result is a very simple script written with AutoIt, posted here for public consumption.

Running the script

The script is called AutoPicKit.au3. A compiled version called AutoPicKit.exe is included in the ZIP file below. It was compiled with AutoIt v. 3.1.1.

Read the beginning of the .au3 file for the details. Basically, if you run it with no command-line arguments, it’ll ensure the PICkit applet is open and try to write the most-recently-used .hex file. If you specify a .hex file on the command line, it’ll try to load and write that. If the full path is not specified, it assumes the script’s default directory.

Using the script with the SourceBoost IDE

To have SourceBoost automatically program a chip with the PICkit2 on a complete build:

  1. Unzip the ZIP file, and put the files somewhere convenient.

  2. In the SourceBoost IDE, under Settings > Options, in the Tools tab, press the “…” button next to the Programmer field, and browse to the AutoPicKit.exe file.

  3. Press Set Default to make this the global default. Then press OK.

  4. Under Settings > Build, check Program.

Now you’ll automatically program your PIC at the end of a successful build.

AutoPicKit.zip115.03 KB



This is now made obsolete, probably, by the command-line version of the PICKit2 software that Microchip has just released at http://www.microchip.com/pickit2.


Pickit2 programming from BostC

The Microchip command line .exe would not work for me in BoostC! - Yours worked first time.

Just a quick note to say Thanks.


So, maybe not obsolete

Hey, that’s great to hear! Thanks for letting me know.

works in mplab with pickit2

Hi Timothy,

We had the problem that after compiling in mplab, pickit starts to upload to the pic already but then halfway the hex file is changed again (we think). Then the write fails.

Now in mplab→project→buildoptions→custom build→post-buildstep we specify your file (copied in the project folder). Now pickit2 flashed the pic without any problems. Thanks !!! :D

keep em commin ;p Peter

Hey, great!

I’m glad it’s useful! Cheers.

Very Useful Tool

I find this tool very useful. I looked for a long time to find a way to launch the PICkit 2 GUI from a command line so it could be used with any IDE. Thanks for keeping this around. I promoted it in my monthly newsletter about PIC programming.



Thanks very much! It’s satisfying to hear that it’s useful to someone else.

Some day, we’ll develop some kind of technology that allows all programs to be automated by a simple, textual means. Maybe we could call it a “command line.” ;)

Not able to use it with Ver7.0

Hello, Thanks for the big help you have been for so long, as I have used AutoPickit for directly burning the code to the PIC from my SB IDE. But recently after I upgraded to Ver 7.01, I cant do that. Maybe there is some issue with the place where the hex file is stored, because as I press the “P” switch in the IDE, the autopickit starts, but fails to load the hex file saying, the path does not exists. Btw, the change in ver 7.01 is that the hex file is stored in a separate folder called ‘Release’ within the project folder. Hope to hear from you soon :) and thanks again for such a nice app. Regards Shreevardhan


I haven’t updated to SourceBoost 7.x yet, because I’m in the middle of some projects and didn’t want to break anything. But, given your description of the problem, I have a possible solution. Try the attached file called “AutoPicKit-beta.zip” and let me know if it works!

Where to find AutoPicKit-beta.Zip

Thanks again for you reply. Sorry to inform you but I didnt find any file attached. Maybe I dont know where to look for it. It would be great help if you let me know from where to download it. Thanks in advance Shreevardhan

Sorry got the file

Really really sorry for not been able to see it located on the page. My bad! Got it now. Would try and let you know if it works as good as the previous one. Thanks and Regards Shreevardhan

Now working with SourceBoost 7

I upgraded to SourceBoost 7 today, saw the problem, fixed AutoPicKit, and replaced the attachment with the new version. Enjoy.