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.
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.
To have SourceBoost automatically program a chip with the PICkit2 on a complete build:
Unzip the ZIP file, and put the files somewhere convenient.
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.
Press Set Default to make this the global default. Then press OK.
Under Settings > Build, check Program.
Now you’ll automatically program your PIC at the end of a successful build.
| Attachment | Size |
|---|---|
| AutoPicKit.zip | 114.86 KB |
Comments
Obsolete?
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.
—tjw
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.
Tim
So, maybe not obsolete
Hey, that’s great to hear! Thanks for letting me know.
Post new comment