AVR Raspberry Pi Programmer

There are a number of ways to program AVR microcontroller chips. For my DIY projects, I like to save money by buying components and putting them together to create what I need. I bought some blank ATMEGA 328P micro controllers so that I could make Arduino circuit boards for my projects. Building the Arduino circuit board myself rather than buying the completed Arduino saves money. Granted, it takes more time, but to me it is more satisfying to do it myself.

Since I have blank chips, they need the Arduino Bootloader programmed in. My favorite programmer for that purpose is a Raspberry Pi shown below.

Raspberry Pi Programmer

Raspberry Pi
Programmer

It uses a modified version of AVRDude especially for the Raspberry Pi. Instructions on how to get it and use it are here.

Here is how it is wired.

WIRING THE RPi to the ATMEGA 328

 Code   ATMEGA   RPi  RPi GPIO       Wire
        Pin     Pin    Pin          Color
-------------------------------------------------------
Reset    1      24     GPIO 8 SPI    YELLOW
MOSI    17      19     GPIO 10       BROWN
MISO    18      21     GPIO 9        ORANGE
SCLK    19      23     GPIO 11       BLUE
3.3V    7       17     3.3V          GREEN
GND     8       25     GND           BLACK

The astute observer will note that besides the 6 wires, I have a 16Mgz crystal  on the breadboard. If the chip is blank when it is being programmed this crystal is not needed, however there are times when I reprogram a chip. For those times, the crystal is needed because the fuses are set to use external clocking rather than the internal clock.

 

Leave a Reply

Your email address will not be published.