Make RadioLocman Your Homepage!
»All»News»Articles»Circuits»Sites»Datasheets»Devices»Forum  RadioLocman.com Electronics
ru
Advanced Search + Schematics Circuits

06-02-2010

Atmega fusebit doctor (HVPP)

The project is intended for noncommercial usage only

Paweł Kisielewski

Atmega fusebit doctor, as name says it, device for repairing dead Atmega family AVRs by writing wrong 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.

This circuit uses the parallel high-voltage programming method. Atmega8 (doctor) has saved in it’s memory signatures of most common AVR Atmega uC’s, just put your dead mega 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: Atmega8, Atmega16, Attiny2313. There is also an extra goldpin connector with all signals so you can attach 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. In doctor memory there is a lot of free space so project may be developed all the time. One sided PCB with 55mm × 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 470ohm to 1K.

Schematic diagram

Atmega fusebit doctor - Schematic diagram
Click to enlarge

You can find extra RS232 output, connecting to this (at 38000 bps) we will receive all information about fixing process – see exemplary printscreen in gallery. Of course terminal is not needed, all we want to know we get from leds.

содерживое окна терминальной программы

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:

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.

Code for this point supports only Atmega16, Atmega32, and Atmega8 – these was tested. Support for other uC (within Attiny2313) i will ad as soon as i find some time to do that :)

If you are searching for attiny family AVR’s fusebits fix device, then check my previous project, the Attiny fusebit doctor.

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

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.

Firmware 2.01 BETA – support for 76 uC’s, Tested ones are lightened green. User feedback is priceless in this project, so if you successfully fixed some chip, or not, please tell me.

2kB:
Attiny2313, Attiny26, Attiny261, Attiny28

4kB:
Atmega48, Atmega48P, Attiny461, Attiny43U, Attiny4313, Attiny48

8kB:
Atmega8515, Atmega8535, Atmega8, Atmega88, Atmega88P, AT90pwm1, AT90pwm2, AT90pwm2B, AT90pwm3, AT90pwm3B, AT90pwm81, AT90usb82, Attiny861, Attiny88

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

Eagle 5.4.0 project files, PDF & PNG schematic and PCB’s version 2.0d, HEX & BIN firmware version 2.01 BETA - download

UPDATE#2 03.06.2010

Hardware update, added two adapters:

  • “#1 adapter” as HVPP extension, for 20pin Attiny26 compatible and 40pin Atmega8515 compatible processors.
  • “HVSP adapter” for 8pin and 14pin HVSP processors.

Firmware update, V2.03:

  • Added support for HVPP chips: AT90s8515, AT90s8535, AT90s1200, AT90s4433, AT90s4414, AT90s4434, AT90s2333
  • Added support for HVSP adapter and HVSP chips: (8pin) Attiny11, Attiny12, Attiny13, Attiny15, Attiny25, Attiny45, Attiny85, Attiny22, AT90s2323, AT90s2343 (and 14pin) Attiny24, Attiny44, Attiny84

Device will automatically detect the HVSP adapter and start in the HVSP mode (info on rs232 output).

Added all sockets compatibility list with images… “B” means that this is the adapter #1 socket, and “C” – HVSP adapter socket.

Total supported chips: 96.
Total DIL socket compatible: 53

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.

DOWNLOAD – eagle 5.4.0 project files, PDF & PNG schematic and PCB’s for both adapters, HEX, BIN and EEP.BIN firmware version 2.03.

http://diy.elektroda.eu/atmega-fusebit-doctor-hvpp/?lang=en


RadioLocman - Media

Free Service Manuals Free electronic Projects