Atmel AVR High Voltage Fuse Reset on a Breadboard

Submitted by pomprocker on December 19, 2008 - 2:48am.

A big mess

Here is what happens when you don't plan well...A big hairy mess.

 

Parts:

 

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:

http://mightyohm.com/blog/2008/09/arduino-based-avr-high-voltage-programmer/

 

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.

http://mightyohm.com/blog/wp-content/uploads/2008/09/hvfuse.pde

 

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:

http://palmavr.sourceforge.net/cgi-bin/fc.cgi

 

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

http://mightyohm.com/blog/wp-content/uploads/2008/09/hvfuse_fixed.png

 

You can use an Arduino pin map to help:

http://www.arduino.cc/en/Hacking/PinMapping168

 

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

GND -> GND

 

Other connections (no resistor):

Good Atmega -> Bad Atmega

14PB0 -> 20AVCC, 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.

AttachmentSize
HVFuse8.hex4.4 KB
( categories: )