Pocket AVR Programmer Hookup Guide

Pages
Contributors: jimblom, bboyho
Favorited Favorite 10

Introduction

Do you need more control over your AVRs? Whether it's an ATmega328, ATmega32U4, ATtiny85, if it's an AVR there's a good chance the AVR Pocket Programmer can program it.

Pocket AVR Programmer

Pocket AVR Programmer

PGM-09825
$18.50
60

There are many reasons for programming your AVR via an in-system programmer (ISP). If your AVR doesn't have a bootloader on it, it's probably the only way to load code. Or maybe you want to overwrite the bootloader to squeeze out some extra flash space. Or maybe you want to poke at the fuse bits, to change the brown-out voltage. Or maybe you just want a faster and more reliable code upload.

Covered In This Tutorial

In this tutorial we will introduce you to all of the important aspects of the AVR Pocket Programmer. It's split into a series of sections, which cover:

  • Board Overview -- A look at the hardware components that make up the AVR Pocket Programmer.
  • Installing Drivers -- How to install the AVR Pocket Programmers on a Windows machine (Mac and Linux users can skip this page).
  • Programming via Arduino -- How to use the ubiquitous "easy-mode" AVR IDE to upload sketches via the AVR Pocket Programmer.
  • Using AVRDUDE via Command Line -- A more advanced, command-line-based approach to using the AVR Pocket Programmer.
  • Troubleshooting -- A few troubleshooting tips for resolving some of the AVRDUDE errors that you may run into.

Required Materials

Most importantly, to follow along with this tutorial, you will need an AVR Pocket Programmer and an AVR to program. On top of that, a mini-B USB cable is required to connect the Programmer to your computer.

Programming action shot

That microcontroller-to-be-programmed can be any AVR with 64K or less of flash. The ATmega328 on an Arduino Uno or RedBoard works perfectly, but the ATmega2560 of an Arduino Mega does not.

Beyond that, you may need something to interface the Programmer to your AVR. Here are some useful accessories, which might make the job easier:

  • Straight Male Headers -- If you have an AVR on a development board -- like an Arduino Pro -- the 2x3 (or 2x5) ISP header may not be populated. You can use straight male headers (also available in a long-pinned version) to make a temporary contact between ISP cable and your dev board. There is also a 2x3 pin version.
  • ISP Pogo Adapter -- Like the headers, this ISP adapter is designed to provide a temporary electrical connection between adapter and AVR. This is a great, more reliable alternative to the headers.
Break Away Headers - Straight

Break Away Headers - Straight

PRT-00116
$1.75
20
Break Away Headers - 40-pin Male (Long Centered, PTH, 0.1")

Break Away Headers - 40-pin Male (Long Centered, PTH, 0.1")

PRT-12693
$1.05
1
SparkFun ISP Pogo Adapter v2

SparkFun ISP Pogo Adapter v2

KIT-23451
$14.95
Header - 2x3 (Male, 0.1")

Header - 2x3 (Male, 0.1")

PRT-12807
$0.75
Note: If your AVR is living on a breadboard, you probably don't have an interface to the standard 2x3 ISP pinout. Our old simple breakout board made interfacing the programmer with your breadboarded circuit possible. We recommend using the ISP Pogo Adapter linked above now that the breakout board has been retired in the catalog.

Suggested Reading

Whether you're a beginner or experienced electronics enthusiast, the Pocket Programmer should be easy to get up-and-running. If you've programmed an Arduino before, you'll be well-prepared for the next step. Here are some tutorials we'd recommend reading before continuing on with this one:

  • What is an Arduino? -- If you're unfamiliar with AVRs, check out this tutorial to learn about the most popular one of the lot.
  • Installing Arduino -- Arduino isn't required to use the Programmer, but it can make things easier, especially if you still want to program your AVR using the Arduino libraries.
  • Serial Peripheral Interface (SPI) -- The Pocket Programmer uses an SPI interface to send data to and from the AVR. Click this tutorial to learn the meanings behind "MOSI", "MISO", and "SCK".

Serial Peripheral Interface (SPI)

SPI is commonly used to connect microcontrollers to peripherals such as sensors, shift registers, and SD cards.

What is an Arduino?

What is this 'Arduino' thing anyway? This tutorials dives into what an Arduino is and along with Arduino projects and widgets.

Installing Arduino IDE

A step-by-step guide to installing and testing the Arduino software on Windows, Mac, and Linux.