loading
Atmega fusebit doctor, as name says it, device for repairing dead Atmega and Attiny family AVRs by writing fabric fusebits. Most common mistakes or problems are a wrong clock source (CKSEL fusebits), disabled SPI programming (SPIEN fuse) or disabled reset pin (RSTDISBL fuse). This simple and cheap circuit will fix you uC in a fraction of a second.

If in first case we can help ourself with clock generator, then in 2nd and 3rd cases bring uC back to life is impossible with standard serial programmer. Most of people do not decide to build parallel programmer because its inconvenient and its cheaper and faster to buy new uC.



Project site - how to fix AVR fusebits

Step 1: Sockets


This circuit use the high-voltage parallel and serial programming method. Atmega8(doctor) has saved in it’s memory signatures of 96 (so far) AVR Atmega and Attiny uC’s, just put your dead avr in socket, press the START button, and enjoy your good-as-new processor.

There are three slots on board, for most common AVR’s, pins compatible with: DIP28 Atmega8, DIP20 Attiny2313, and DIP40 Atmega32 compatible processors.

There is also an extra goldpin connector with all signals so you can attach adapters:
-the "#1 HVPP adapter" with DIP20-B Attiny26 and DIP40-B Atmega8515 compatible
-the "HVSP adapter" for tiny DIP8 Attiny13 and DIP14 Attiny24 compatible.
-your own adapters for other types of processors, in trough-hole or surface-mounted, you can use the breadboard for this – just connect signals to correct pins. How? Check your AVR datasheet, go to “memory programming” and then “parallel programming” – check the signal names, all signals are described under the DIP40 slot.




Step 2: Montage note


ATTENTION! While mounting the DIP40 slot, you must to remove it pins from 29 to 37. These pins must not have electrical contact with inserted uC pins. Take a look at this pic, these you must remove from slot:

Step 3: Other

Leds explanation:

green on – patient successfully cured, fusebits repaired. If lockbits are enabled, just verify fusebits with factory ones – and if they ok – light up green.
red on – signature problem, can’t read, no device in socket, or no such signature in database.
green flashing – signature ok, fusebits are wrong. Lockbits enabled, chip erase permission required (read below).
red flashing – signature ok, no lockbits, but for some reason can’t write new fusebits.

The ALLOW ERASE jumper allows doctor to erase whole flash and eeprom memory, if it is open, doctor will newer erase memory but may not cure device if lockbits are enabled, so you choose. After insert dead uC and press the START button, doctor will initiate the parallel programming mode. If our patient will not respond with high state at RDY/BSY line, doctor will use other way to initiate programming mode even if the XTAL pins are switched to external resonator. After that doctor will erase whole memory if user allows that. Then, read device signature and check if it supports it. Next are lockbits checked, and if they not blocking device, doctor sets all fusebits to fabric, having regard to whether there are extended fusebits or not. After that fusebits are verified, and proper leds are flashed. Also, all the info are send trough usart.

Code was written based on high-voltage parallel programming section of datasheet of suitable AVRs.

Fusebits: Internal 8MHz clock, and enabled EESAVE bit.

One sided PCB with 55mm x 92mm dimensions. On top side you need to solder several jumpers, or, make this PCB as double sided – choose yourself. Power: stabilized 12V. Resistors from R7 to R23 may be in 100ohm to 10K, but i suggest from 330ohm. You can find extra RS232 output, connecting to this (at 38000 bps) we will receive all information about fixing process – see exemplary printscreen. Of course terminal is not needed, all we want to know we get from leds.

If you get green led, you can be 100% sure that fusebits are restored correctly. If processor still do not respond to standard ISP programmer, that means it have hardware SPI damaged or it is damaged in other way. If you get the red led, the only thing you can do is check what doctor sends over the rs232 – then i can help.

As this is now 2in1 (HVPP and HVSP) 8kB of Atmega8 memory was too short to fit all the goods inside…
1.Not all of chips names are send over rs232, but most common. This does not affect fixing process in any way.
2.Some of text for rs232 are holded in the eeprom memory. Even if you do not need the rs232 output, you MUST write the EEP.BIN to eeprom. This is a BIN (RAW) file, NOT hex.

Step 4: Supported chip list

So far 96 chips are supported (53 in DIP sockets), all the rest are SMDs - no adapters yet.

1kB:
AT90s1200, Attiny11, Attiny12, Attiny13, Attiny15
2kB:
Attiny2313, Attiny26, Attiny261, Attiny28, AT90s2333, Attiny22, Attiny25, AT90s2323, AT90s2343
4kB:
Atmega48, Atmega48P, Attiny461, Attiny43U, Attiny4313, Attiny48, AT90s4433, AT90s4414, AT90s4434, Attiny45
8kB:
Atmega8515, Atmega8535, Atmega8, Atmega88, Atmega88P, AT90pwm1, AT90pwm2, AT90pwm2B, AT90pwm3, AT90pwm3B, AT90pwm81, AT90usb82, Attiny861, Attiny88, Attiny85
16kB:
Atmega16, Atmega16U4, Atmega16M1, Atmega161, Atmega162, Atmega163, Atmega164, Atmega164P, Atmega165, Atmega168, Atmega168P, Atmega169, AT90pwm216, AT90pwm316, AT90usb162
32kB:
Atmega32, Atmega32U4, Atmega32M1, Atmega324, Atmega324P, Atmega325, Atmega3250, Atmega325P, Atmega3250P, Atmega328, Atmega328P, Atmega329, Atmega3290, AT90can32
64kB:
Atmega64, Atmega64M1, Atmega649, Atmega6490, Atmega640, Atmega644, Atmega644P, Atmega645, Atmega6450, AT90usb646, AT90usb647, AT90can64
128kB:
Atmega103, Atmega128, Atmega1280, Atmega1281, Atmega1284, Atmega1284P, AT90usb1286, AT90usb1287, AT90can128
256kB:
Atmega2560, Atmega2561

Step 5: Download

Here you can download all the files, three attachments, you need doctor PCB from "update1" attachment, and adapters PCBs with 2.03 firmware from "update2" attachment.

The files are rars, if you get the tmp file change the tmp extension to rar.

For next updates -> http://diy.elektroda.eu/atmega-fusebit-doctor-hvpp/#eng

See READ!.txt from last update aattachment, read carefully!



<p>hello,</p><p>could you please let me to have .c file this project ?</p><p>when i run Hex file. Error happens<br>Please help me.</p><p>mmm.6336@gmail.com</p><p>Thank you. </p>
The firmaware is a fake !<br>The sotware size is to big to flash memory ,ATmega8 ,12Kb .<br>Exemple :<br>atmega_fusebit_doctor_2.01_BETA.HEX = 21KB<br>atmega_fusebit_doctor_2.09_m168.hex =31 KB<br><br>If use first-release-03-05-2010 ,the microcontroler ATmega 8 is blocked !!<br>i d'ont recomand to test this softawre ,only scop of autor is to damage your microcontroler !!<br>Be carefull !!
<p>I also think so... unable to write the firmware. size is too big....</p>
<p>Hi, I recently built one of these units and it works perfectly. The reason for the hex files being larger than you would think is because they are a hex defined ascii file. A binary (BIN) file would be the exact size that you are thinking of.</p><p>The correct file for the ATMega8 (which I used) is atmega_fusebit_doctor_2.11_m8.hex</p><p>I also used an arduino UNO as the programmer and ran AVRDUDE to program it. The fuse bits also have to be set; low fuse to E1(hex) and high fuse to D1(hex). Be careful with the fuse bits as you can brick the ATmega8 and it's now useless. Which is why I built a FuseDoctor to unbrick a mega8 that I screwed up programming its fusebits.</p><p>The FuseDoctor works well. I only use it in the stand-alone mode. I have never used the serial comm's option.</p><p>Adafruit has some excellent tutorials on using AVRDUDE.</p>
<p>cmd -&gt; avr-size atmega_fusebit_doctor_2.01_BETA.HEX</p>
Go and learn some basics, and stop discredit yourself. <br> <br>600 comments on project site are also faked? <br> <br>And BTW, 2.11 firmware and 2h PCB are available, it seems that there are no more bugs at all :) Version 2.1x brings new feature, you can send your own fuses etc to uC trough terminal. <br> <br>It supports 145 chips now. <br> <br>Also, PCBs will be available to ship worldwide :) <br> <br>Sorry for not posting news here, got no time :(
<p>Does any one know how to burn the firmware on ATmega8? AvrDude not working </p>
<p>Waaait. this is a really cheaty way of resetenig avrs. :D I love it!!! </p>
<p>hello everyone, please someone tell me how to upload hex file to atmega8 , as I don't know much about hex files, as in all of my projects I only used arduino ide</p>
<p>a wonderful project!</p>
<a href="http://www.microcontrollerprog.com" rel="nofollow">http://www.microcontrollerprog.com</a><br> under $30, not worth to build one yourself.
under $30 i rather buy one hv programmer can also fix fusebit under$40
I tried it but doesn&acute;t work, the green led is on but i can&acute;t see the repaired atmega8 with avrdude.
Update your hardware and firmware (2.08 will be available today on project site) and then reply if it worked. I assume that you use 2.03 and you do not written eeprom file properly. <br> <br>Also, to be up to date with updates - http://twitter.com/manekinen
Nice, i was looking for something like this. keep it up!.
Nice chip fixer! I can't say I muddle with the bits in the chips all that often, but if I did this would be a handy time and dollar saver :D
Very good job, the PCB looks excellent. I never could get my silk screens to turn out that good when I ironed them on.

About This Instructable

58,249views

63favorites

License:

More by manekinen:How to fix dead atmega and attiny avr chips Repair dead AVR's - Attiny fusebit doctor (HVSP) AVR acoustic spectrum analyzer 
Add instructable to: