0

I recently bought the Attiny85 (picture below)

enter image description here

I managed to install it correctly following the official guides, never that a problem. Drivers are installed correctly, and I used the Arduino IDE to actually upload a few sketches and tested them in two computers.

SUDDENLY

It has stopped working, based on my research, it seems that the bootloader got damaged....any idea on how to fix this? I thought about burning the bootloader using Arduino, but I barely got an idea on how to begin.

Backside of the Attiny85 enter image description here

4
  • You'd need a high voltage programmer to change the bootloader on the digispark. I've used a separate Arduino with a high voltage programmer sketch, a transistor and a stack of three coincells (for the high voltage), to change the fuses, to enable the reset pin. But it's not a very beginner friendly process. I'd cut my losses and get a new board.
    – Gerben
    Aug 3 '20 at 14:57
  • That sounds like a wonderful beginner project! In any case, if I buy a new one, this will probably happen again, so it is time to start getting into it right away. Do you have any resources on how to start doing this? I'm getting an Arduino Uno this week @Gerben
    – Corfucinas
    Aug 4 '20 at 2:54
  • I like your enthusiasm. I'm not sure what code I used, but github.com/ArminJo/ATtiny-HighVoltageProgrammer_FuseEraser seems like it will do what you want. It will reset the fuses of the ATTiny85 to the default values, re-enabling ISP on the ATTiny. It uses a boost converter to generate the 12V, but you could also stack 3 coincells and hold two jumperwires to each end (like I did). After that you can program the bootloader using the Arduino-as-ISP method.
    – Gerben
    Aug 4 '20 at 14:00
  • Wonderful @Gerben. I'll look at it and try it within a few days when my Arduino gets delivered. Thanks for the help (I'll let you know how it turns out).
    – Corfucinas
    Aug 5 '20 at 3:14
0

The 3 default ways to re-program your tiny on that board are:

  • micronucleus bootloader (sketches only)
  • ISP prog. (sketches & set-fuses, InSystemProgramming)
  • HV prog. (re-set fuses, HighVoltage = 12V don't worry)

The bootloader in itself is like a sketch on the chip (at the beginning, taking up flash space) and talks through the software USB port on that board. It then rewrites parts of its own flash from the data the host sends, when you upload new sketches.

If that part gets damaged it won't get recognized by the host anymore and you can't use the board to reprogram itself. Unless the chip/parts died to ESD or other reasons, you still can use ISP/HV programming on the chip, which is the solution to your problem.

Read up on fuses, they are the init settings of your chip (like a BIOS) defining its behaviour. There are some fuses which can only be set once, after which they can only be changed by the HV method. Depending their setting on your chip, this could also be done with normal ISP programming.

This instructables shows how to build a HV programmer, but also demonstrates using an Arduino as normal ISP programmer (Step 4).

The original Digispark comes with the RSTDISBL fuse set, meaning you can't directly use ISP (which requires the reset pin). Thats why HV programming is neccessary, to regain the reset pin, after that you can reflash the bootloader via ISP. From then on you can use the bootloader again, to reprogram (upload) your sketches.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.