Note: for an updated version of this project see "ATTiny Fuse Reset with 12 Volt Charge Pump" which adds an integrated 12 volt power supply.
I like working with the Atmel's ATTiny series of microcontrollers and, from time to time, I'll mess up and "brick" one of them by setting a fuse value to something that disables further reprogramming of the chip with my AVR ISP MKII programmer. The way out of this impasse is to use a High Voltage programmer but, as I don't own one, I looked for another solution. My salvation came from a page by Paul Willoughby that describes how he built a HV Fuse Programmer using a few resistors, one 2N3904 NPN transistor, a 12 volt power source (I used 8 AAA batteries, but an A23 battery would be a more elegant solution), and an Arduino. After doing a bit of research to figure out how his code worked, I added a few improvements, such as the ability to read the device signature and use this to reset the fuses to the correct factory default for each device. The result is shown below.
If you want to use this code, start by building Paul's simple circuit on an Arduino Protoboard. Here's my version of the needed circuit set to reprogram an ATTiny13 (or another 8 pin ATTiny, such as as the ATTiny25-45-85 series). The same design will also work with the 14 pin ATTiny24-44-84 series, but the pin connections to the device will be different.
Note: the battery polarity is reversed the diagram above. Positive goes to R5.
Next, you can add 8 batteries, or connect up a lab power supply to supply the 12 volts needed. Next, load the sketch (there's a download link at the bottom of the page), plug in an ATTiny device that needs its fuses fixed (see list of supported devices in the source code) and open the Serial Monitor in the Arduino IDE and select 19200 baud as the serial rate. Then, send a character to the Arduino using the Serial Monitor's "send" button to trigger the fuse reset cycle. The code will print out the device signature and before and after values of the fuses and, that it. You should now have a functional ATTiny!