Arduino

Flash Attiny with a Micronucleus Bootloader like Digispark and Paperduino

Escrito por: ­ 2 de nov de 2016 ­ 15.556 views

Would you like to use with your Developing Board like (Pluggable Development Board for ATtiny13A/ATtiny25/ATtiny45/ATtiny85 Programming Editor Micro Usb Power Connector), or to use them like a Digispark solution, or even create your own like Paperduino.

This post is outdated get a new version here:

Here, we will go to show you in a simple way how to get there.

What is Micronucleus Bootloader?
I have the bootloader and now?
What you will go to need?
Installing Arduino ISP:
Assembly in a Breadbord – ISP (In system Programmer)
Adding Digispark Board to the Arduino IDE.
Flashing the Bootloader
Troubleshooting
Extras


Subscribe in our Youtube channel

 

What is Micronucleus Bootloader?

Micronucleus is a bootloader designed for AVR Attiny microcontrollers with a minimal USB interface, cross platform libusb-based program upload tool, and a strong emphasis on bootloader compactness. To the authors knowledge this is, by far, the smallest USB bootloader for AVR Attiny.

In order to download the last version of micronucleus, access the following link. Also, you can access our download area, to get the same version we have tested during the last few months.


I already have the bootloader, what to do now?

That is a really good question, I have found several tutorials and none of them could help me at all. Lots of tutorials are being made considering different level of knowledge. Take this in consideration we have developed a simple solution using avrdude and micronucleus. By the utilization of our solution you will be able to flash a Micronucleus bootloader in an easy way. Just connect the Attiny in your Arduino with ISP connection and press the button.

Don’t worry about any kind of configuration. If you are an advanced user, probably this is too much simple for you, however still useful.

So, in the next line we will go to show you step by step.


What you need?

Arduino/Genuino/Uno, Duemilanove, Mega, Nano, board (1) – he have tried these ones.
Pluggable Development Board For ATtiny13A/ATtiny25 (1)
Breadboard (1)
Capacitor -10µF (1)
Jumper wires (some)
LEDs (for test)
Resistors 220 Ω. (for LEDs)


Installing Arduino ISP:

arduino-isp-sketch arduino-isp-sketch_conexao arduino-isp-sketch_run


Assembly in a Breadbord – ISP (In system Programmer)

Attiny85 Pin Arduino Pin
8 5v
7 13
6 12
5 11
1 (Reset) 10

 

Capacitor
Reset (+) Gnd (-)

 

Attiny85 Esquema En

attiny-arduino-ligacao

Assembly in the Arduino board, already with ISP Firmware.


Adding Digispark Board to the Arduino IDE.

Follow exactly the steps mentioned in the following link until you reach the post message : ” The install is now complete!”


Flashing the Bootloader

Download the FlashBootloaderAttiny85.rar in our download area (under Arduino session) By this software you will be able to flash the Micronucleus Bootloader.

Not needded an Arduino IDE in this step
It must be necessary that your Arduino board have uploaded the ArduinoISP program
It must be necessary that your Arduino is connected to the microcontroller (ISP connection)

flash_bootloader_1

Choose your language

flash_bootloader_2_en

Select your microcontroller

flash_bootloader_3_en

Our software will go to show you in which COM port your Arduino is connected. Select just one port

flash_bootloader_4

This message shows that you succeed in the process

flash_bootloader_5-en

As usual it is always important to have a double check, so hit the first option [1]

flash_bootloader_8

Make sure you get the polarity correct. The small, etched circle on the microcontroller should line up with the “notch” on the socket, otherwise your board will burn

Get your board, a good cable and the microcontroller flashed

flash_bootloader_6-en

The system is waiting for connection

flash_bootloader_7_en

This message informs your that everything is OK!


Troubleshooting

  • Can’t find the COM port with Arduino connected.
    • Try to replace your cable, change your USB port that your Arduino is connected
  • Dll missing – libusb0.dll
    • In this case you have two options:
      • Install an Arduino IDE
      • Install the WinAVR software in the following link link:
  • Windows cannot recognize the flashed chip (already in the developing board)
    • Install the drive delivered in the Micronucleus folder
  • Windows cannot recognize even after driver installed
    • Install the driver again, however now choose the software ZADIG to make the process
      • Choose your device (not recognized) (1)
      • Choose libusb (2)
      • Install Driver (3)
        zadig-hackeduca
  • Windows still cannot recognize even after the above mentioned steps.
    • Change your USB cable
      • The cable must be a good one, preferable an USB 2.0 ready cable (we have several issue, that were solved by cable replacement)

Extras

  • Clock
    • Usually Attiny works well with 1mhz clock, however Digispark works with 16mhz. This process change your chip to 16mhz
    • In case you want to change to 1 mhz, or 8 mhz, use the method described in this tutorial (link here), after you finalized the assembly go to IDE do Arduino [Tools] ->Select your Board (Chip) –>Choose the Clock –> [Burn Bootloader].
  • Digispark works with 6 pinos as I/O and this method cover 5 pins only (1 reset, 1 Vcc and 1 Gnd)
    • This method considers only 5 pin + 1 reset, 1 ground e 1 Vcc because we still want to make this chip able to receive update via ISP.
    • It’s possible, however not recommended, the conversion from reset to I/O, however keep in mind that you cannot restore this process using an ISP method. You have to use a high voltage programmer.
    • In case you really want to convert your reset pin into a I/O pin, use our software called FlashBootloaderAttiny_without_Reset in our download area, under Arduino folder

 

 

Leave your comments

print
Previous Post Next Post

Você também pode gostar / You Might Also Like

10 Comments

  • Reply wajahat 11 de fev de 2017 at 01:30

    its also a nice tutorial worked for me for burning micronucleus bootloader on attiny using Arduino Uno, very easy.

  • Reply ketan 24 de fev de 2017 at 12:46

    Hi,

    i cannot find the file FlashBootloaderAttiny85.rar in the downloads section.

    can u provide an alternate link?

  • Reply Sigi 25 de jul de 2017 at 12:32

    Hi
    The FlashBootloaderAttiny_without_Reset does not work, “it is outdated”

    • Reply Edson Sobreira 26 de jul de 2017 at 07:23

      Thanks we are working on that

    • Reply Edson Sobreira 29 de jul de 2017 at 00:30

      Hi, Just release a new version.
      5 and 6 pin in the same file.
      Enjoy

      • Reply Sigi 29 de jul de 2017 at 15:29

        So after burning the Attiny85 with 5 pins it is not possible to program it with arduino again right?

        The V2.0 it is giving some errors… like:
        System.InvalidCastException: Conversion from string “07-29-2017” to type ‘Date’ is not valid.

        • Reply Edson Sobreira 29 de jul de 2017 at 17:34

          Hi Thanks to inform about the bug.
          New version is available to download.

          You can use Arduino to program. No issue about it.
          If you want to restore to the original condition, just make the connection (Arduino + Attiny) and go to Arduino IDE, Tool, Burn Bootloader.

      • Reply Sigi 29 de jul de 2017 at 15:31

        So after burning a Attiny85 with 5 pins it is not possible to program it with an Arduino again right?

    Leave a Reply

    Show Buttons
    Siga-nos no Facebook
    Siga-nos no Twitter
    Siga-nos no Google Plus
    Siga-nos no Pintrest
    Siga-nos no Youtube
    Siga-nos no Scratch
    Hide Buttons
    Top
    HackEduca