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.