hvsp fuse resetter probing a target tiny85 device
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).
to minimize 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.
project fuse setting
avrdude -c usbtiny -p t2313 -V -U lfuse:w:0xe4:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m
display showing low and hi fuse in hex
references and related projects
[April 11, 2011] thanks tomlut pointed out there is a mistake in the schematic. the npn switch transistor has collector and emitter swapped. please observe that the emitter should be grounded and collector should be connected to the RESET pin of the target device. the following schematic has not been fixed yet.
you will need to remove tiny2313 and have it programmed off circuit
more physical layout details
i am not detailing the development enviroment here. my setup is avr-gcc under linux. if you have trouble you can also use the following hex files and skip the build