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.

AttachmentSize
AutoPicKit.zip114.86 KB

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