I had ordered a few Pro Mini knockoff boards (based on SparkFun's Pro Mini) and found that I didn't have an actual Arduino programmer around; I had been using an Arduino Nano and a DigiSpark, both of which are programmable via their built-in USB ports. I did, however, have a Bus Pirate! (and Linux, so the Avrdude Command and Udev Rule sections may not be that useful elsewhere)
Connections
Pro Mini | Bus Pirate ----------+------------ GND | GND VCC | +5V RST | CS MOSI 11 | MOSI MISO 12 | MISO SCK 13 | CLK
Udev Rule
# Bus pirate v3
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", GROUP="users", MODE="0666", SYMLINK+="buspirate"
# Bus pirate v4
SUBSYSTEM=="tty", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="fb00", GROUP="users", MODE="0666", SYMLINK+="buspirate"
Avrdude Command
avrdude -v -c buspirate -P /dev/buspirate -p m168p -Uflash:w:/path/to/file.hex:i
Note: If you do this through the Arduino IDE, it disables auto erase for flash memory (adding -D to the command line) which causes the write to fail, at least on my device. Removing that flag fixed the issue.
There may be some other missing pieces here, but this should hopefully be enough for me to pick this up again in the future. Now, on to using my Bus Pirate to fix the programming on my new Pro Micro! (since I accidentally flashed a hex file that was compiled for the wrong chip)
References
- Bus Pirate AVR Programming - Dangerous Prototypes
- Bus Pirate - ArchWiki
- (Bus)Pirate Arduino - I Like Pepper
- Arduino Bus Pirate - Flav's Wiki
- Use BusPirate to upload Sketch to Arduino Ethernet - neophob.com
- Programming Arduino Pro Mini with Bus Pirate - Dana Harding
- Using a Bus Pirate as an Arduino programmer? - forum.arduino.cc
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.