I got into AVR chips because they are easy to program, and that has become more and more true over the years with the ever-falling cost of programmers. But it’s pretty easy to make a mistake when burning the fuses on the chips and if you don’t have a proper programmer (my first programmer was a horrifyingly slow self-built DAPA cable) you’ll have a brick on your hands. This little board may be able to help in that situation. I gave the USB µISP a try this week. The half-stick-of-gum-sized board flashes firmware like a champ and includes a rescue pin for when you have clock source problems.
Here it is, used as an In-System Programmer for an ATtiny84 chip. The programmer powers the target and has a switch to change between 3.3v and 5v. An AP2331 seen in the schematic provides over-current and reverse-current protection.
This board was designed by our friend [Nick Sayer] and is based on the USBtiny programmer by [Dick Streefland]. Programming with AVR Dude is fully supported using the programmer argument “usbtiny”. I didn’t need to do anything to gain access to the board. When plugged in via USB it enumerates on my Linux Mint 17 system as: “1781:0c9f Multiple Vendors USBtiny”. There were no problems with permissions (sometimes I need udev rules for USB programmers) as the AVRdude port argument “usb” works.
It ships with a shrouded header for the 6-pin ISP connection as well as the IDC cable which has a key in the plastic housing to ensure the cable is plugged in correctly. I appreciate the silk screen on the back side of the board which identifies each of the six signals. I’m frequently using 6-pin ISP for programming on a breadboard and don’t actually have the pin-header on the target. This allows me to look at the bottom of the board and the bottom of the IDC plug to insert jumper wires quite easily. This is what I did to test out the programmer’s killer feature which is a recovery clock signal.
This is a new design of the board as of February 2015. There is a single pin header located in the middle of one long edge of the board. The vast majority of the time you won’t use this, but when you need it you’ll be glad it’s there; it’s a recovery clock signal.
AVR chips have a configurable clock which can be driven using an internal oscillator or an external crystal or clock signal. Because these settings are “burned” into resettable fuses, a chip reset will not fix things if you choose an external source and don’t actually have one. In this case, connect this single pin header to the appropriate pin on your target and you’ll be able to reset the fuses to use the internal oscillator (or choose the appropriate external clock speed if that is the cause of your problems).
There is just a single command-line change needed when using this pin to rescue a chip. Add “-B 250” to enable the appropriate SPI clock timing via AVRdude. Below I scoped the rescue signal and I went through the process of “bricking” and recovering a chip just as an example.
Conclusion and Some Extras
Over all I’m very happy with this programmer. It brings the no-nonsense you expect from a USB ISP programmer and adds in the occasionally necessary clock signal. It doesn’t have high-voltage programming and it can’t be used as a debugger. But I have other tools for that which are a hassle to set up just for ISP and are more bulky. For the beginner this is a great programmer to start with, for the experienced AVR aficionado this is a nice and inexpensive addition to your embedded tools.
As an extra, I really enjoyed watching this video [Nick] made about the production process. He gets full panels of boards with the surface mount components already populated but the firmware hasn’t yet been flashed. His routine uses a pogo-pin adapter to program, but there is a failure on a few of the modules. Turns out that the crystal pins for the on-board ATtiny2313 sometimes bridge during reflow. A quick touch of the iron removes the short and the board fires up just like it should.