Dangerous Prototypes

Dangerous Prototypes => Bus Pirate Support => Topic started by: knuckles on August 10, 2014, 10:30:32 am

Title: i want to program the paperduino with bus pirate
Post by: knuckles on August 10, 2014, 10:30:32 am
is it straight forward using the BP on the attiny with the micronucleus hex ?
and using avrdude ? any tips on this ,as i have a few different attinys i want to do
Title: Re: i want to program the paperduino with bus pirate
Post by: timb on September 03, 2014, 01:24:44 am
Yes, very straight forward. Simply connect MOSI, MISO, CLK, 5V, GND and CS to the MOSI, MISO, CLK, Vcc, GND and RST pins respectively. Then use avrdude like you normally would! Here’s an example command that reads the fuses of a connected Mega328P:

Code: [Select]
avrdude -c buspirate -P /dev/tty.usbserial-BPv3.6 -p m328p -v

You can also load up special firmware that makes the BP act like an STK500v2; in that case you would replace:
Code: [Select]
-c buspirate
Code: [Select]
-c stk500v2

I recently needed to program some devices and don’t have a dedicated ICSP (I’m an MSP430 guy myself), so I figured the easiest way was creating an Arduino shield with a 28-pin socket, completely forgetting the Bus Pirate could do it! So I spent a night wiring up a Proto Shield I had laying around, and then a few hours banging my head against the wall when I couldn’t get it to work reliably. I thought maybe the target device needed a crystal, so I added that. Still nothing. By chance I saw the BP in the list of supported avrdude programmers and decided to wire it up directly and see if it worked. I also decided to use a different, fresh chip instead of the one in the Arduino-Programmer. It worked! …it also worked in the Arduno-Programmer… Turns out I had fried the original chip I was working with at some point. *Doh!*

At any rate the Bus Pirate works much better and is much less fiddly, as I can clip the probe leads directly to IC pins without putting it in a socket (which requires removing it, which always leads to bent pins; I’m too cheap to order a ZIF socket for something I’ll use once in a blue moon).