AVR Multi-Tool Learns The Latest Tricks

Like many of us who fiddle with microcontrollers, [Mike] and [Brian] often found themselves using an ISP programmer and a USB-to-serial adapter. But when they started working on the latest generation of ATtiny chips, they found themselves in need of a Unified Program, and Debug Interface (UPDI) programmer as well. So they decided to wrap all three functions into one handy open hardware gadget.

They call their creation the AVR General Purpose Programmer, or AVRgpp for short. It runs on an ATmega328P with a Pro Mini bootloader, which means that the programmer itself is fully compatible with the Arduino IDE. USB-to-serial capability is provided by a CH330N, and a MC14053 digital switch IC is used to select between talking to the AVRgpp’s onboard MCU or the target device.

A 128 x 32 I2C OLED and two push buttons are used to select the device’s current mode, and there’s a physical switch to select between 5 V or 3.3 V power for the target. There’s also a ST662 12 V regulator, as UPDI targets occasionally need a high voltage pulse to switch into programming mode. Everything is packaged up in a pocket-sized laser cut enclosure that you can easily toss in your bag.

[Mike] and [Brian] say they are considering putting the AVRgpp into small scale production if there’s enough interest, so let them know if you’d like to get one without having to build it yourself.

AVR Programming 04: Writing Code, Etc.

Welcome back to this fourth and final installment of the series. The first three parts should have been enough to get you off the ground, but a few more learning examples wouldn’t hurt. It’s also a good time to discuss some of the other things these little chips can do. Join me after the break to:

  • Expand the sample code, adding features to our simple program while I challenge you to write the code yourself.
  • Discuss AVR fuse bits, how to use them, and what to watch out for
  • Touch on some of the peripherals you’ll come across in these chips

As a grand flourish to the series, I’ve used the example hardware from this final part to build a bicycle tail light. Hopefully this will inspire you to create something much more clever.

Series roadmap:

Continue reading “AVR Programming 04: Writing Code, Etc.”