Arduino AVR High-Voltage Serial Programmer

My son Paul is the author of this guest post.

This Arduino sketch is useful for rescuing ATtiny microcontrollers rendered useless by incorrect fuse settings. It does this by putting the bricked tiny into high-voltage serial programming mode and writing the fuses to safe values.

Connection Diagram

Diagram

Click to enlarge

The Arduino is connected to the tiny though 1k resistors and a 2N3904 transistor is used to switch 12 volts applied to the tiny’s reset pin. After uploading the sketch the Arduino sends “Enter a character to continue.” repeatedly until communications are established by sending a byte through the serial monitor. The Arduino then programs the fuses.

Serial Monitor log

Enter a character to continue.

Enter a character to continue.

Enter a character to continue.

1

Entering programming Mode

lfuse reads as 62

hfuse reads as 5F

efuse reads as FF

Writing hfuse

Writing lfuse

lfuse reads as 62

hfuse reads as DF

efuse reads as FF

Exiting programming Mode

Download the program: hv_serial_prog.pde

Based on work by Jeff Keyzer.

Let me know if it works for you.

Comments

  1. Works like a charm.

    My AtTiny13 was bricked due to a corrupted Boards.txt file. I fixed it with your sketch.

    My implementation on a breadboard was:
    – 1K resistors for R1-R4
    – 18k for R5
    – BC547B for T1 (most general purpose NPN will do 546,548)
    – A 12V LED power supply

    Thank you for sharing!

  2. Rhoderik says:

    Thanks so much! I just rescued 4 attiny85’s!!!

  3. Takao Shimizu says:

    Works fine.
    Thank you.

  4. Hi All,
    In order to reset the fuses on the ATTINY24 use this pinout.

    //SDI PA6 I Serial Data Input (pin 7)
    //SII PA5 I Serial Instruction Input (pin 8)
    //SDO PA4 O Serial Data Output (pin 9)
    //SCI PB0 I Serial Clock Input (pin 2)
    //must ground pins 11,12,13)

Trackbacks

  1. Display Blog says:

    Arduino Usb To Serial Converter

    […] structions to read and write the fuse bits are similar. I would first try commen […]

Speak Your Mind