Usage Instructions

To use the AVR HV Rescue Shield to burn fuses on an ATmega168 AVR:

Step 0:

Verify your Arduino is working and your IDE is properly configured.  A simple blinking LED circuit is good for this.

Step 1:

Load the HVRescue_Shield sketch in the Arduino IDE and click the “upload to Arduino” button.  On older Arduino’s, you’ll have to manually press the reset button on the Arduino first.

Step 2:

Install the Rescue Shield on the Arduino.  Make sure there is no target AVR installed in either socket at this point.  The red BURN LED may turn on briefly as the Arduino finishes its reset, but eventually the green READY LED should turn on.

Step 3:

Click the “serial monitor” button at the top of the Arduino IDE.  It’s the rightmost button in the toolbar, a rectangle with an antenna sticking out the top.

If interactive mode is enabled in the sketch, you should see a prompt to install the target AVR and push the button, as shown here:

Step 4:

Insert the target AVR into the corresponding socket.  IC1 is for the ATmega48/88/168/328 series, IC2 is for the ATtiny2313.

Step 5:

Push the button on the Rescue Shield, it’s labeled GO!

The red BURN LED should turn on and you will be prompted for new fuse values to send to the target.

Step 6:

Enter the fuse values, in the form “0xFF”.  The leading “0x” is important (the fuse value parsing code is very simple).  The default values for an ATmega168 are given as a suggestion.

Enter the fuse values into the box above the serial window, and click “Send”.  In this example, I am entering an LFUSE value of 0xC7.

Using the same procedure, enter the HFUSE value:

In this example, I entered 0xDF, the default HFUSE value for the ATmega168.

If EFUSE support is enabled, you will need to enter a desired EFUSE value as well (not shown).

Step 7:

The sketch will burn the desired fuses to the part, and then read the fuses back again to verify.  When the process is done, you will see the message “Burn complete.” as shown below:

If the fuses read back match the ones you entered, you’re done!

The red BURN LED will turn off when the burn process is finished, and the green READY LED will come back on.

Once the BURN LED is out, remove the target AVR.  You’re done!

Options:

Options are listed immediately after the title block of the sketch.  If you change options, you must recompile the sketch and upload it to the Arduino.  Be sure to remove the Rescue Shield before uploading sketches to the Arduino.

// User defined settings
#define  ATtiny       0     // Set this to 1 to flash the ATtiny2313 (default is ATmega48/88/168)
#define  INTERACTIVE  1     // Set this to 0 to disable interactive (serial) mode
#define  BURN_EFUSE   0     // Set this to 1 to enable burning extended fuse byte
#define  BAUD         9600  // Serial port rate at which to talk to PC

// If interactive mode is off, these fuse settings are used instead of user prompted values
#define  LFUSE        0x62  // default for ATmega168 = 0x62
#define  HFUSE        0xDF  // default for ATmega168 = 0xDF
#define  EFUSE        0xF9  // default for ATmega168 = 0xF9
  • To burn the fuses on an ATtiny2313, edit the sketch and change the ATtiny option to 1.
  • To disable interactive mode, set INTERACTIVE to 0.  You will need to set the LFUSE, HFUSE, and EFUSE (if desired) values below to the desired fuse values.
  • If you want to burn the EFUSE byte in addition to LFUSE and HFUSE, set the BURN_EFUSE option to 1.

Join the resistance.

%d bloggers like this: