Last week we made the Bus Pirate into an AVR STK500v2 compatible programmer by porting some existing open source code. Now we’re looking for a similar code-base that programs PIC microcontrollers.

The PIC programmer landscape is a bit sketchy. As we understand, it’s not feasible to impersonate an existing programmer interface like the PICKIT2 or the ICD2. MPLAB actually bootloads a different firmware into these programmer for each chip family (though that makes it easy to clone the hardware). Microchip doesn’t make the protocol public (?), which is probably why there’s no existing code to port.

The only open source PIC programming toolchain we could find is Usbpicprog (GPL), with Windows and Linux clients. It supports PIC 12F- 16F- 18F- and DSPIC30, all 5volt parts. These chips require 13volts to enter programming mode, which would have to be generated and controlled via a small breakout board. There’s only two simple source files toport to the Bus Pirate hardware.

The big catch is that the PC-side software doesn’t support serial ports…yet. This is where you come in. If one of our talented readers can add serial port output to the Usbpicprog application, we’ll port the PIC firmware. We’re also up for alternative suggestions, open source projects we may have missed.

There’s some other 3rd party programming software out there with open hardware but no firmware source. WinPic800 (GTP-USB+ hardware) and USBURN (PIC Brenner8/Brenner9) have open hardware that can burn a number of PICs, but neither make firmware source available. Brenner9 is particularly interesting because it programs PIC24/ds33/32, which could all be programmed at 3.3volts from the Bus Pirate without an adapter.

Advertisements