Atmel AVR High Voltage Fuse Reset

(Lesson Learned: Divots should face each other)


1 – Breadboard
1 – Set of breadboard jumper wires
2 – ATmegas (one good one, and the one you’re locked out of)
2 – Regulated power sources, 12vdc and 5vdc
1 – LED
1 – 2N3903 or 2N3904 transistor (available at Radio Shack)
1 – Tactile/Momentary Button (Omron B3F-1000 is a popular one, can be stuck into a breadboard)
20 – 1K Ohm Resistors, 1/4 watt is fine.

This tutorial is based off of the work of Jeff Keyzer at his website:

I have attached a hex file containing the code to ‘fix’ a locked ATmega8, If you want to use his code, you have to have the Arduino IDE installed and you have to compile it with that. Once you have the .hex file, you can upload it to your mcu via AVR Studio if you like.

Make sure before you compile it, that you change the high and low fuse values based on the ones listed on the AVR Fuse Calculator website:

The schematics he provides are bit tricky without an actual Arduino if you are just using an ATmega on a breadboard.

You can use an Arduino pin map to help:

Otherwise I am providing the basic pin connections below (refer to the schematic for hooking up the transistor, led, and button):

Note: The form here is the pin number followed by the pin name.

Connections w/1k ohm resistor in series:

Good Atmega -> Bad Atmega

2PD0 -> 14PB0

3PD1 -> 15PB1

4PD2 -> 16PB2

5PD3 -> 17PB3

6PD4 -> 18PB4

11PD5 -> 19PB5

12PD6 -> 23PC0

13PD7 -> 24PC1

15PB1 -> 6PD4

16PB2 -> 5PD3

17PB3 -> 4PD2

18PB4 -> 3PD1

19PB5 -> 11PD5

23PC0 -> LED, Button

25PC2 -> 25PC2

26PC3 -> 9PB6

27PC4 -> 12PD6

28PC5 -> 13PD7


Other connections (no resistor):

Good Atmega -> Bad Atmega

14PB0 -> 22AGND, 21AREF, 7VCC

24PC1 -> button

Just remember it will be easier to work with if you place the two ATmegas on the breadboard with the divots facing each other. I learned this from experience 😉

Once you get it all hooked up, here is how it goes:

  • Apply the voltages.
  • Wait for the red LED to turn on (if it isn’t already)
  • Push the ‘Go’ tactile button
  • As soon as the LED turns back on, the AVR is unlocked!

Any questions, feel free to contact me.

This entry was posted in AVR, fuse, programmer. Bookmark the permalink.

5 Responses to Atmel AVR High Voltage Fuse Reset

  1. == TUK == says:

    Hi friend!Excelent Work! Can you help me with a Atmega128 solution? I disable ISP and JTAG by a test, and don´t have a HVProg. I can use some schematic? do you have some source example for this ? Regards!

  2. Brandt says:

    Hey good question, I’ll have to take a look at this closer and i’ll get back to you in the next couple days!

  3. Brandt says:

    Yes, you can use this to fix your ATmega128. Look on page 292 of your datasheet: you change the code using the Arduino IDE to suit your needs. It also tells you what pins to use.

  4. targeted says:

    Good day I am so excited I found your weblog, I really found you by mistake, while I was researching on Aol for something else,
    Anyhow I am here now and would just like to say thanks a lot for a marvelous post and a all round entertaining blog (I also love the theme/design), I don’t have time to go through it all at the minute but I have bookmarked it and also added in your RSS feeds, so when I have time I will be back to read a lot more, Please do keep up the excellent work.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s