Hello World

My firmware development environment is coming together.

Cheap breadboard and power supply from Banggood EU
Digispark ATTiny85, USBasp and ribbon cable from FastTech
2010 MacPro server running Ubuntu 18.04 with the tools from toykeeper’s readme.

Next steps:

Check the fuses.
Modify the “hello world” app to load on the t85. Makefile is set for a ’13a.

I know I don’t need the Digispark board. I could just get a DIP ATTiny 85 and stick that in the bread board.

Fuse Check:

E:FE, H:DD, L:E1

PLL Clock

SPI Enable (good)
Self Program Enable
Brown-out level 1

Low Fuse needs changing to D2.

Cool beans.

Edit- my programmer showed up in the mail today. You are way ahead of me, but please keep posting. I need all the help I can get. I don’t even have a driver to flash.

Drivers are easy to get. I have two Convoy 3/5 mode drivers but my clip isn’t here yet.

I’m using the digispark because it is here. The USBasp is talking to it. The next step is to test flashing a sample driver. The “Hello World” sample is set to target a ATTiny13. I can either modify that or flash one of the more complex firmwares.

Nice! But you shouldn’t need the extra power supply - the USBASP serves pretty well as power supply alone.

I found a driver and made contact last night.
I am planning on just using a driver to test on.

What are disadvantages of doing it this way?

The biggest one is you are stuck with that driver’s hardware configuration. That doesn’t matter if you are targeting that driver anyway.

Great. I still like your set up but would like to keep it cheap. Might mount driver and led on small board with switch so it dont get knocked around.

Yes. My bargain breadboard came with a power supply. There is another 3-pin regulator on the digispark board. In case I don’t already look like a total idiot, the digispark is self programming. Will erasing the Arduino bootloader make me even more of an idiot? I’m not sure if that is possible.

USBASP — $2.30
Ribbon Cable $1.64
Digispark $2.01
Breadboard, jumpers and power supply £4.63

Total is just under $12 US.

A name brand SOIC clip is going to blow the entire budget.

A 3M SOIC 8 clip is about £20 from a trusted UK supplier. The Pomona 5250 is £12.98 from Farnell.

I could get one from AliExpress for a fraction of that but that might be a mistake. Need to research.

I did spring for the good clip. The one I got 2 winters ago gave me head ache.
I have a lot to learn about programming

Well that was easy….

PWM could be entirely wrong but I don’t care. This was just to test compile and flash.

~/AVR/HelloWorld$ make
CC STAR_smaller.o
avr-gcc -Wall -g -Os -mmcu=attiny85 -o STAR_smaller.o -c STAR_smaller.c
LD STAR_smaller.elf
avr-gcc -Wall -g -Os -mmcu=attiny85 -o STAR_smaller.elf STAR_smaller.o
OBJCOPY STAR_smaller.hex
avr-objcopy -O ihex STAR_smaller.elf STAR_smaller.hex
SIZE STAR_smaller.hex
avr-size STAR_smaller.hex
text data bss dec hex filename
0 892 0 892 37c STAR_smaller.hex

~/AVR/HelloWorld$ make flash
FLASH STAR_smaller.hex
avrdude -c usbasp -p t85 -u -Uflash:w:STAR_smaller.hex -Ulfuse:w:0xe2:m -Uhfuse:w:0xdf:m -U efuse:w:0xff:m

avrdude done. Thank you.

Great. Looks confusing to me. Will be trying it soon

Well, the boot loader is gone anyway now, I guess. In case you want to build more test devices or brick your digispark, you could simply order cheap Attiny85 in DIL housing, just search vor “ATTINY85-20PU”.

Congratulations for your first flashing!

Well, you could try to programme something decent in the Arduino environment, but I don’t think anyone has tried here.

I agree, I suspect the bootloader is now gone. Putting one back could be a challenge, and it takes up a LOT of space.

So, maybe time to learn how things really work and buy a few bare devices. They are not expensive and readily obtainable in the UK.

The digispark was only $2.01 including shipping. RS sell the ATTiny85-20PU in packs of 5 at £1.066 each.

Not much of a difference indeed.
Where did you buy the digispark? Might find a use for it one day.


They sell the populated board in two versions.

$1.88. or $1.59 for 5.

$2.01 This is the one I have.

The $1.88 version doesn’t have the 3pin header. I may buy some of them for other projects.

If you’ve never done this before, there is a fair amount to learn. It isn’t hard.

I made a few small edits to the makefile and STAR_smaller.C to target an ATTiny85. Next, I ran make. I pasted some of the output back here to show that it worked.

I can walk you through the edits if that would help.

What I flashed to the ’85 may not work. I don’t care since I was testing compile and flash.