Pi AVR Programmer HAT Hookup Guide
Raspberry Pi Setup
Before we can do any programming, we need to do some setup work on our Raspberry Pi. If you are fairly familiar with Raspberry Pi, then you should check out the quick setup list for advanced users below. If you are fairly new to Raspberry Pi, then we recommend checking out the following tutorial: The Raspberry Pi 3 Starter Kit Hookup Guide. This offers a great walkthrough to setting up your Raspberry Pi with NOOBS (Raspberry Pi's easy-to-use graphical OS installer).
Raspberry Pi 3 Starter Kit Hookup Guide
April 11, 2016
Quick Setup List:
Install avrdude: Run the following command
sudo apt-get install avrdude
.Put these four files in /home/pi:
Put the modified version of rc.local in your /etc folder.
Enable SPI hardware: Run
sudo raspi-config
(as explained in the "Raspberry Pi SPI and I2C Tutorial" ).Open permissions on these files (to avoid debug errors). Run the following command:
sudo chmod 777 test.py avrdude_gpio.conf pi_program.sh your_firmware.hex
.Adjust pi_program.h to your desired programming settings. Here you can choose fuse bits, device ID (your target type), programming speed (
-b 125000
is the flag for setting this).Launch test.py. Run
sudo python test.py
(or reboot and rc.local will launch it for you).Tap PROGRAM!