Digispark Digistump ATTiny85

Post Reply
Valued Contributor
Posts: 436
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 55 times
Been thanked: 250 times

Digispark Digistump ATTiny85

Post by mnfisher »

I had a quick go at writing a short program for a ATTiny85.

Normally this would entail pulling out the USBTiny programmer and wiring up the necessary 6 pins. Being in a hurry - I tried to get a Digispark board working... These are neat little ATTiny 85 boards (they also do a 'pro' with a 'beefier' tiny - a 167 I think) This was ideal for my needs - it has an onboard voltage regulator (and I wanted to power LEDs). However I wanted as small (read flat) a form factor as possible - for a wearable - and I didn't want to solder on pins..

So - the board has a bootloader and can be programmed via USB.

Can it be done via Flowcode - yes :-)

First download the micronucleus program from https://github.com/micronucleus/micronucleus/releases
Unzip the file and you'll need the command_line program x86_64MINGW micronucleus.exe

Note you might need to install a USB driver (see the digispark board at http://digistump.com/wiki/digispark) for instructions on setup.
Note that there are many 'clone' boards - and the one I have has version 2.2 firmware (and wouldn't work from Arduino IDE which was expecting v1.6) - There are newer (and smaller) versions of the bootloader - I might experiment with later.

Then I created a very simple batch file
@SET Programmer=micronucleus

D:\micronucleus\commandline\builds\x86_64-mingw32\micronucleus.exe %5

@ECHO Programming successful!
Note that the address you unzip the exe file to might be different... Adjust line 3 to suit...

Then I saved this to C:\Program Files (x86)\Flowcode\Common\Compilers\avr\batchfiles

Then pointed FC to use this from Compile Options - Programmer Which I saved as 'Micronucleus'

Then I can compile ATTiny85 code and upload it quickly and easily from within Flowcode. When the 'programmer' runs I just need to plug the board into a USB port...

Did I manage it in time - no :-(


Post Reply