3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

AVR HVSP Fuse Resetter

AVR HVSP Fuse Resetter
description

in working w/ 8 or 14 pin avr devices, i would sometimes want to use the RESET pin as io as the io pin count is low. but doing so will disable further programming via SPI. i do not need a full blown HV programmer, just a way to revert these devices to factory default fuse settings so that i can use SPI to flash them again. it is also handy as sometimes by mistake i may burn wrong fuse value and brick my devices.

this project is created so that if i could revert the RESET fuse change and flash via SPI again. it employs the high-voltage serial programming (hvsp) available for such devices. note that this is not to be confused w/ the high-voltage parallel programming used for 20pin+ devices (i.e. tiny2313, mega8, etc).


features

* reads device signature and hi-low fuses for hi-voltage serial programmable attinys
* reset hi-low fuses to factory default on target devices
* layout to drop-on attiny13, attiny25/45/85 8 pin devices targets
* attiny24/44/84 targets needs additional breadboard and jumper wires
* standalone operations, fuses values show on 7 segment display
* cannot reset fuse for attiny2313 and atmega devices as they requires hi-voltage parallel programming

Example Operation





 
Remove these adsRemove these ads by Signing Up
 

Step 1Design Notes

Design Notes

design notes

to minimise project component count, the 4 digit led module is directly driven by the 2313's io pins. neither transistors nor current limiting resistors are used. for more detail implementation notes, please see my digital alarm clock project. the led driving takes up 12 io pins (4 digits + 7 segments + decimal point).

for hvsp purpose, we need to have 6 io pins from t 2313. we need to supply 5V Vcc, 12V to RESET, SCI (serial clock input), SII (serial instruction input), SDI (serial data input) and SDO (serial data out). for that we employ the rest of the free io pins from the 2313, plus some io pins are shared between led driving and hvsp control.

one single tactile button is used to accept input, this io pin is shared between button input and led driving.

upon attaching power firmware reads target mcu device signature via AVR's HVSP (High-Voltage Serial Programming) interface. it then look up the device name by matching the device signature. in turn, fuse values (hi, low and extended) are read from device.

fuse values can then be read by pressing the tactile button, which cycles thru device name and various fuse values in hexidecimal format.

pressing and holding the tactile button for about one second will instruct firmware to write the factory default fuse value to the target mcu device. after writing, firmware re-reads the new fuse values for display.

at all times a timer interrupt is used to perform led multiplexing. brightness can only be adjusted by source code change.

i had included the more common device types, source code is provided so that different / additional device can be added to the firmware. please note that only devices with HVSP support can be used.

the circuit requires a main power of 12V supply, a 78L05 voltage regulator brings a 5V Vcc for the 2313 to operate. a 2n2222 is used to switch on 12V towards the target device's RESET pin when HVSP read / writes are being commenced.

« Previous StepDownload PDFView All StepsNext Step »
14 comments
Mar 14, 2012. 1:17 AMWally Ao says:
Whether the 7 segment led display is common cathode type? The schematic shows
the pin 5 of the 2313 connect to the pin 3 (DP) of the display. Whether it should be connected to the pin 2 (segment D)?
Mar 29, 2012. 11:42 PMWally Ao says:
Dear SimpleAVR,

I have no luck that my fuse resetter didn't work. I have checked many times and would not find out what was wrong. I would like to ask for your help to double check my schematic. The hex file and the eepom file were built by AVRstudio 4 using youe c file without any modification. Thanks in advance.
Mar 30, 2012. 9:19 PMWally Ao says:
Hi SimpleAVR,

I could not find the PM link in instructables nor simpleavr.com. I would like to contact you here.
. LED module did not light up upon power up.
. HEX code write to MCU is OK. 8MHz and set L fuse 0XE4, H fuse 0XDF, E fuse 0XFF.
. Pin 20 Vcc voltage is 5.05V.
. Push switch checked OK.
. Apply V- to led module pin 12, 9, 8, 6 and V+ to other pins. The module light up normally.
. The voltage of the transistor at B 0.76V at C 0.05V. It should be saturated.
Mar 31, 2012. 5:07 PMWally Ao says:
Many thanks Simpleavr. The hardware problem has been solved. As soon as I swapped the Led module to a common anode type, the resetter was operating.
It reset the Attiny 85 to defaule setting 0x62, 0xDF, 0xFF. But it can not reset
Attiny 25. It read t25, 437d, FF00. I am an AVR programing dummy. Would you please help me to include the resetting of Attiny 25.
Apr 11, 2012. 10:43 PMWally Ao says:
Dear simpleavr,

The tiny that I have resetted is Attiny25V-10SU. I found that it was successfully resetted. The problem was I have written the ISP frequeency of the programmer too high at 125KHz. When I reset the ISP at 64.8KHz, the chip can be written as usual. Now, I have tested 13A, 25V, 85V are being resetted successfully.
Thank you very much for your help.
Nov 7, 2011. 6:11 PMcomputurwizard says:
Can you use an Atmega8 in place of the 2313? Just wondering as I do not have any 2313's on hand :/

Excellent Instructable BTW, thanks for sharing!
Aug 13, 2011. 11:39 PMNickYa says:
Can it reset Atmega8 or any other Mega?

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
22
Followers
5
Author:simpleavr