Let's Make Robots! | RobotShop

Bricked! ATTINY2313 Repair with HV Rescue Shield


This blog post contains my build of a "HV Rescue Shield" by MightyOhm.  The High-Voltage Rescue Shield is a high-voltage programming shield that fits on an Arduino.  The Rescue Shield works on 28-pin ATMEGA ICs and on 20-pin ATTINY2313 ICs.  My use/instructions for now only concern resetting the LFUSE (clock fuse) so that the IC can be used with a 16MHz crystal.


I bricked my $3 µC IC on my first attempt at programming.  Recently I found some DIY AVR HV programmers that could be made from stuff in my lab.

EagleCAD Schematic/Board and Arduino Code (.pde file)

The rescue shield can be built on a single-sided board if a few jumpers are used on the top side:


The official v2 code: https://www.robotshop.com/letsmakerobots/files/HVRescue_Shield11.pde

Comments:  The official version 2.0 is available in EagleCAD, but uses a voltage booster IC.  I don't have those in my lab, so I'm using a transistor. 

Code:  I played around with the version 1 Arduino code, and the version 2 Arduino code.  The version 1 worked with a transistor and external High-Voltage source, but the version 2 supports ATTINY2313.  Clearly I need to merge the versions or at least be certain that the versions will work together. 

The original v1 code (not for ATTINY2313): https://www.robotshop.com/letsmakerobots/files/hvfuse.pde

My sequence in development to reset the LFUSE to 0xFF (16-20MHz XTAL): https://www.robotshop.com/letsmakerobots/files/hv_rescue.pde


Results: The HV Shield PCB has been fabricated on the Valkyrie-clone CNC; the PCB has not been soldered nor tested.  My soldering iron's last tip turned to dust so I cannot complete the shield for at least another day.

 Other AVR ICs: A Russian fellow built an ATTINY HV Programmer ("Fuse Doctor") for other ATTINY chips, but not ATTINY2313.  In the Fuse Doctor, an ATTINY2313 µC is used as the programmer brain instead of using an Arduino for that task. 

AVR_Rescue_board.png42.74 KB
AVR_Rescue_shield.png50.55 KB
hvfuse.pde4.2 KB
HVRescue_Shield11.pde11.85 KB
hv_rescue.pde1.94 KB
HVRescue_Shield.brd30.17 KB
HVRescue_Shield.sch118.4 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I'm currious about how you bricked the avr? Was it through setting the clock to use something incorrectly? I know this may be a bit off topic, but I was able to recover with a non HV method using the programmer(stk500 clone) I have as it generates a clock freq for apparently just such a recovery. Currently I only know of 1 way to brick where you need  an HV method to unbrick and thats when you disable the reset pin(so you can use it for something else). I'm still new to the avr but I thought I'd throw that out there.


Hi Voodoobot -- The ATTINY was "bricked" with a bad LFUSE setting (0xF0 = clock, not crystal).  My programmer is a USBtinyISP from Adafruit, so I have no external clock.  For some reason HV reprogramming seemed simpler than building my own external clock.   The ATTINY has been a brick since about August 2009, but I got a new signal generator for Christmas (an USBee SX), so now it probably makes more sense to use the USBee to generate a clock signal.  I wrote down the bad fuse setting in pencil on the µC so I can look up the expected clock frequency.  I may discover that synchronizing an external clock with the USBtinyISP is a non-trivial problem, in which case I'll probably go back to the HV programmer idea.

Thank you for the suggestion -- since I haven't finished building the HV programmer yet, I'll probably try reprogramming with a signal generator as an external clock.


I learned to appreciate it, to own a HV-Prog. Some time ago I bricked some ATmega48 in a debugWire session.

It take some time and 4 ATmega processors before I found out what happened. When debugWire is enabled, the ISP interface is disabled. You can only switch back to ISP in debug mode. So far so bad. Unfortunatly if your program writes the PRR register while you are in debugWire mode, the ATmega will be bricked. After writing the PRR register both the debugWire fuse and the ISP fuse is disabled.No way to exit debugWire mode.

Only with a HV-Programmer you can switch back to ISP mode.


yeah, I don't have one, but I've considered getting one due to the fact that you would need one if you ever wanted to bring back one of the procs that you've disabled the reset pin for....at least thats my understanding.
under $30, not worth to build one yourself.

I had looked at that HV programmer -- thank you for posting the link.  "Worth" is relative -- I had enough spare parts to make one from mostly what was already in my lab.  Also I have a CNC PCB drill, so the board was made automatically.  The only thing I really had to work on was the EagleCAD routing, and I wanted the practice.  All in all, building the HV shield probably kept me out of more expensive trouble while I was looking for new projects to build with the CNC.