Introduction: How to Fix Dead Atmega and Attiny Avr Chips
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
Add a Teacher Note to share how you incorporated it into your lesson.
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
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.
AT90s1200, Attiny11, Attiny12, Attiny13, Attiny15
Attiny2313, Attiny26, Attiny261, Attiny28, AT90s2333, Attiny22, Attiny25, AT90s2323, AT90s2343
Atmega48, Atmega48P, Attiny461, Attiny43U, Attiny4313, Attiny48, AT90s4433, AT90s4414, AT90s4434, Attiny45
Atmega8515, Atmega8535, Atmega8, Atmega88, Atmega88P, AT90pwm1, AT90pwm2, AT90pwm2B, AT90pwm3, AT90pwm3B, AT90pwm81, AT90usb82, Attiny861, Attiny88, Attiny85
Atmega16, Atmega16U4, Atmega16M1, Atmega161, Atmega162, Atmega163, Atmega164, Atmega164P, Atmega165, Atmega168, Atmega168P, Atmega169, AT90pwm216, AT90pwm316, AT90usb162
Atmega32, Atmega32U4, Atmega32M1, Atmega324, Atmega324P, Atmega325, Atmega3250, Atmega325P, Atmega3250P, Atmega328, Atmega328P, Atmega329, Atmega3290, AT90can32
Atmega64, Atmega64M1, Atmega649, Atmega6490, Atmega640, Atmega644, Atmega644P, Atmega645, Atmega6450, AT90usb646, AT90usb647, AT90can64
Atmega103, Atmega128, Atmega1280, Atmega1281, Atmega1284, Atmega1284P, AT90usb1286, AT90usb1287, AT90can128
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!
1 Person Made This Project!
- apurpi made it!