Pi AVR Programmer HAT Hookup Guide

Pages
Contributors: QCPete
Favorited Favorite 2

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

Guide for getting going with the Raspberry Pi 3 Model B and Raspberry Pi 3 Model B+ starter kit.

Quick Setup List:

  1. Install avrdude: Run the following command sudo apt-get install avrdude .

  2. Put these four files in /home/pi:

  1. test.py
  2. avrdude_gpio.conf
  3. pi_program.sh
  4. optiboot.hex


  1. Put the modified version of rc.local in your /etc folder.

  2. Enable SPI hardware: Run sudo raspi-config (as explained in the "Raspberry Pi SPI and I2C Tutorial" ).

  3. 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.

  4. 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).

  5. Launch test.py. Run sudo python test.py (or reboot and rc.local will launch it for you).

  6. Tap PROGRAM!