Hand tools and fabrication machines
Amtel AVR Microcontrollers come in a number of variants. The one most Arduino users know is the 28 pin ATmega328 variant. However AVR chips come in 8-Pin, 14-Pin, 20-Pin and 40-Pin packages as well. The less pins on a chip mean less IO ports. The Digispark board which is an Arduino variant uses a ATtiny85 microcontroller and has only 5 IO pins.
Arduino boards (eg Uno, Mega, Digispark) load software from the Arduino IDE via the USB port. This is only possible because the AVR Microcontroller on the board has already been programmed with a special piece of software called a bootloader. However when you purchase a new AVR Microcontroller, it will be blank and you cannot use the Arduino IDE to program sketches for it.
To program a blank AVR microcontroller, you need a special board such as the USBtinyISP programmer. The USBtinyISP allows you to download the software from your PC via a USB cable and program the chip. On the PC side, you run a program called Avrdude.exe or it is run by the Arduino IDE when you select Tools -> Burn Bootloader. AVR Microcontrollers are programmed using 6 pins. Unfortunately, owing to the different IC packages, the pins vary. You can use a breadboard to hookup the output of the USBtinyISP to the AVR Microcontroller you want to program. This however quickly becomes a pain. So this build allows you to easily program most AVR DIL packages. It contains a single zero insertion force (ZIF) socket and five 6 pin sockets wired for most variants of the microcontroller.Version 2
A problem that I have found with AVR microcontrollers (particularly the ATmega328) is that they cannot be programmed without a clock of some kind. If you burn the fuses such that the microprocessor uses an external 16MHz crystal for the clock, you can no longer program it without having that 16MHz crystal and associated capacitors connected to the oscillator pins. My first version of this AVR ISP programmer didn't support a crystal so every time I added a UNO bootloader, the fuses were set to use a 16MHz external crystal and I could no longer program it using this programmer unless I reset the fuses back to their default using a high voltage programmer such as the ATMega Fuse Doctor. So this new version incorporates a plug in crystal for an external oscillator. The only caveat is that you will need to remove it when programming 40pin AVR microcontrollers. All other variants are fine even if a crystal oscillator is not required.Build
A 3D printed box holds the USBtinyISP board and custom PC board (Eagle files included if you wish to have your board commercially made). I made my board using the Toner method.
The crystal is plugged into a female machined header. Either cut the leg of the middle pin or remove it entirely from the 3-pin header.
You can program SMD variants of the AVR range of microprocessors using a special adaptor. These can be found on eBay. Note that the SMD variant of the ATtiny85 comes in both normal and wide variants. You need to use the correct adaptor.
You may think that to use the Arduino IDE, the microcontroller needs a bootloader. A bootloader allows the microcontroller to be programmed via its serial port either using a FTDI board or some other USB to serial system. It also allows you to send and receive messages via the console when the program is running.
If you do not need any of the above functionality, you can use this AVR ISP programmer to upload your code without the need for a bootloader. This can be particularly important when using the smaller ATtiny series of processors. For example, the Digispark bootloader uses around 1K of program space on the ATtiny85. Unless you need to communicate with the IDE console while the program is running, it is just wasted space that can be used for your own code.Conclusion
This simple but effective programmer has become my "go-to" tool of choice when programming these series of AVR chips. I'm sure you too will find it a valuable addition to your toolbox.