See the latest version in the documentation wiki.
Here’s an alternate firmware for the Bus Pirate that clones an STK500 programmer for AVR microcontrollers. We ported the GPL’d source from Guido Socher’s AvrUSB500 ATMEGA8-based programmer to the PIC.
The firmware should work with any applications that support the STK500 v2 protocol. We used it to program the Hackable Christmas card’s ATtiny13A from the latest version of AVR Studio. You could also use it for things like programming the bootloader into an Arduino.
You can buy the Hackable Christmas card ($12 kit, $15 assembled) and the Bus Pirate v3 ($30, assembled with shipping) at Seeed Studio.
More about using the programmer, and it’s limitations, after the break.
Firmware swap
The STK500 firmware (vx-STK500-vx.hex) is a replacement for the normal Bus Pirate firmware. Bootload it to the Bus Pirate using your normal upgrade procedure. You can change back to the regular Bus Pirate firmware at any time.
Connection table
Bus Pirate | AVR ISP |
MOSI | MOSI |
CLK | SCK |
MISO | MISO |
CS | /RESET |
Ground | Ground |
3.3v/5v | Vcc (optional) |
Notes
The v0a release has a few limitations:
- Power supplies are always on. Use them if you like, or not.
- Pin output is currently fixed at 3.3volts. The Bus Pirate pins are 5volt tolerant, but we haven’t tested it with a target running at 5volts – it may or may not work, but it shouldn’t damage the Bus Pirate.
- Extremely slow programming modes may not work, the lowest programming speed is 30KHz (the fastest is 1MHz).
- It’s unlikely that STK500 compatibility will be integrated into the main Bus Pirate firmware. It would be tough to get all the different modes to play well together. For now we’ll release it as a separate firmware.
- Tested on v3 hardware, others untested.
- V2go and v3 hardware use the same firmware.
The image at the top shows MPLAB running the PIC microcontroller in debug while AVR Studio connects to it in in the background. You can also see a live display of serial communication on Portmon in the middle.
Works great, thanks! I’ve been able to program ATMega8s on a v2go with 3.3v using AVR Studio. Love it so much I pre-ordered a v3.
Thanks so much for the report. It’s good to know it works on other AVRs. Look for PIC programming soon.
Any plans on PDI programming protocol so that AVR XMega’s can be supported?
@krop – If there’s any existing code that supports this, I’m happy to port it to the Bus Pirate.
Maybe this will help;
“Open Source XMEGA PDI Programmer!”
http://fourwalledcubicle.com/blog/archives/486
(Please reply to posts instead of posting the answer in a new post. That way mail alerts work :)
is it just me or is the pinout listed a 2×6 header while the BP only has a 2×5? how does that work?
ISP is 2×3, bus pirate is 2×5.
oh, i see. the BP pins are on the left, the re-mapped pins for programming on the right. i thought the whole thing was a 2×6 header. thanks for the reply!
Is the STK500’s clock generator emulated as well? What BP pin do I connect to the AVR’s XTAL1?
Hi Rodan, the stk500 clone only implements the base functionality of the stk500, it doesn’t include extras like the clock generator (as far as I know).
supports the bus pirate with the stk500 firmware now pdi programming?
I’m not sure, do you have a link to more info about that?
Hi! I love my BusPirate v3, but I would like to use it as a STK500 clone for debugging. I downloaded the firmware, but whenever I try to upload it to my BP, it says: “Erasing page 42, a800…ERROR [50]”.
I read somewhere it is because of the bootloader. How can I fix this issue? I don’t have a PIC programmer laying around unfortunately. In the meantime, I’ve reprogrammed it with the normal BP firmware.
Thanks,
Robbe
Hi Robbe, It sounds like you have the old bootloader. Maybe you could try the upgrade:
http://dangerousprototypes.com/docs/Bus_Pirate#Bus_Pirate_v3_bootloader_upgrades
Best regards,
ian