ATtiny Flasher

by Sonocotta

Open-hardware flashing tool for the Atmel ATtiny

View all updates Jun 11, 2021

The Design History of ATtiny Flasher

by Andriy

A bit of history

When I first encountered Tiny chips, it felt like a bit of magic. Such a tiny, $1 thing had a mind of its own, it could run my code, blink GPIOs, and everything. Yes, perhaps it has a smaller CPU and less memory than others, but those limitations are possible to overcome. Better still, people have rewritten Arduino frameworks and key libraries to support Tinys, so in most cases you won’t have to reinvent the wheel. Fantastic!

I just had to use it in my projects.

ATtiny Flasher Rev A

If you were looking for a history of the ATtiny Flasher, the first thing you’d find on the internet is my "Use ArduinoISP sketch" article. It explains how, with just a few wires, a resistor, and a capacitor, you can flash Tiny on the breadboard.

Obviously, this required a custom PCB that could do that whenever I need it. This made for a simple but handy tool.

I immediately identified room for improvement. Smaller and bigger issues became apparent as I started implementing practical Tiny projects.

First, you constantly need to move Tiny from Flasher to breadboard and back to flash updated code. And Tiny’s legs tend to break after a hundred moves or so.

Of course, you can connect Flasher to a breadoard with breakout wires, but then another issue arises: breadboard components can interfere with the firmware flashing process, especially those sitting on the SPI bus.

ATtiny Flasher Rev B

So, the next round of redesign produced a considerably different tool. Essentialy, it would address the first issue by allowing both in-socket and in-breadboard flashing. But, more importantly, it would have the 74HC126 buffer IC on board that would connect host with target only during flashing.

Another obvious improvement was to make the tool also deliver power to the breadboard. As an experimental feature, I added a serial connection beetween host and target, since by then I was getting tired of debugging with LEDs.

ATtiny Flasher Rev C

Revision C of the Flasher introduced minor improvements to the previous design. At this stage, I decided to go public with the project and launch a Crowd Supply campaign.

Although Flasher was already my favourite child, I thought it had to be much better than its competitors to succeed.

ATtiny Flasher Rev D

Thus, in the next revision, I would aim higher and implement a superior design.

One large flaw with motherboard designs I’ve used before is that the Nano board can never deliver actual 5 V due to the protection diode. Another problem is that all Nano clones are slightly different in design and size, so it would be very hard to ensure the Flasher would fit them all.

So, the Nano had to go in, the MCU would live on the board.

Since I had a bit more space and pins now, I decided to add a high voltage programmer (anyone can appreciate another GPIO when they have just five, right?). Since it’s no longer possible to pull out the Nano for reflashing, I had to add a switch to allow the programming host and target to use the same USB port.

Also, since you generally don’t want to suddenly inject 12 V into your breadboard design, so another switch was added to ensure you can’t enable HV programming accidently. Finally, a third switch was added to turn off the serial bridge, which pulls lines high when enabled, which can be quite unfortunate at times.

ATtiny Flasher Rev E

The biggest issue with the HV programmer was that it uses an extra pin for programming. That means some SPI pins would have to switch directions, which in turn would render my buffer IC useless.

So, the 74HC126 quad buffer had to go, freeing space for 74HC241 octal buffer, which can serve both low and high voltage programming, depending on the need (and comtrolled by host).

Also, the target reset circuitry had to be redisigned, since existing HIGH, LOW and HIGHZ states had to add 12V-HIGH option.

Well, all in all, I’m happy to say I received the board prototype a few days back. Both the reset circuitry and LV flashing work, which leaves me with the task of updating the code to support a seamless flashing experience in both HV and LV modes.

About the Author

Andriy

anabolyc  ·   Poland


$1,587 raised

of $8,500 goal

19% Funded

Pledge Now

$25

ATtiny Flasher

ATtiny Flasher with OLED screen.


$19

Educational Project Kit 1: Traffic Light

ATtiny85-driven "traffic light"


$19

Educational Project Kit 2: Rubber Ducky

ATtiny85-driven "USB rubber ducky" tool capable of emulating keyboard & mouse devices


$19

Educational Project Kit 3: IR Messenger

ATtiny85-driven IR remote transmitter & receiver


$19

Educational Project Kit 4: Rainbow LEDs

ATtiny85-driven circle of addressable LEDs


$39

Educational Project Kit 5: Digital Clock

ATtiny85-driven digital clock


$5

Half-size Breadboard

From the Crowd Supply Basics project.

A half-size (3.25 x 2.125 in ~ 8.3 x 5.4 cm) breadboard with a self-adhesive backing


$1

ATtiny13

From the Crowd Supply Basics project.

A 20 MHz, 8-bit, 8-pin DIP AVR MCU with 6 I/O, 1 KiB flash, 64 B SRAM, 64 B EEPROM, a SPI interface, and an input voltage range of 1.8 - 5.5 V.


$2

ATtiny85

From the Crowd Supply Basics project.

A 20 MHz, 8-bit, 8-pin DIP AVR MCU with 6 I/O, 8 KiB flash, 512 B SRAM, 512 B EEPROM, a USI interface, and an input voltage range of 2.7 - 5.5 V.

Credits

Sonocotta

Electronic components and kits


Andriy Malyshenko

See Also

Subscribe to the Crowd Supply newsletter, highlighting the latest creators and projects: