Friday, July 15, 2016

Tool to program an ATtiny85 AVR in situ in a minimalist configuration (ICSP)

Programming the chip, directly on the PCB (i.e. ICSP), via its shoulders.
Note how the pogo pins compensate for approximate placements!

Retractable pogo pins (top) and
regular 3x2 headers (bottom)

A long time ago, I made this little tool to help me upload code to Attiny85 AVR microcontrollers directly on the PCB (ICSP, i.e. in-circuit serial programming), but without even the need for a connector.

It plugs into regular 6 pin adapters of USB ASP programmers, and it relies on so-called elastic/retractable "pogo pins" to make contact with the DIP8 chip.

The assembled programming end.
See the ATtiny85 on the PCB below?

There are many kinds of pogo pins, but I like the "crown" heads best for this job, as they land firmly on the shoulders of the legs of the DIP chip even with some slight misalignment.

This tab makes it sure I do not
plug it the wrong way into the 10-to-6
USB ASB programmer adapter.
Note: ATtiny are much smaller than full-featured Arduinos but they run most of the Arduino software ecosystem (8K memory is a limit though, so I most often prefer not to use Arduino libraries to do it "bare" and know what I have).

The way I programmed them originally was cumbersome, but it sent me on the track.
Then I used to add ICSP headers to my boards, as described here for example.

But eventually I settled on this tool and I really enjoy it, as I can program it in situ and make very small PCB, which is the very reason I use ATtiny in the first place!

The schematic is straightforward. The ATtiny13 has
the same pinout as the one of an ATtiny85, but it has only 1KB of flash
instead of 8KB, which makes it almost uninteresting nowadays.
Check the SMT ATtiny2313 for the most useful one IMHO.

And the PCB. I milled it on a CNC,
then drowned the stuff with epoxy to make it sturdier.

No comments:

Post a Comment