I needed to program few attiny85 chips and decided to use the Arduino Leonardo or Arduino Micro as serial programmers. So I came up with a mini shield that I could mount on either of the two and uses the ICSP header (+a reset pin) to do the job.

Inspiration was this post: https://petervanhoyweghen.wordpress.com/2012/09/16/arduinoisp-on-the-leonardo/ where Peter is actually using the ICSP header to do the attiny85 programmer. After a mini test on the breadboard, it was time to build it!

Results:

wm_img_8542

Overview / Leonardo

wm_img_8547

Closeup / Leonardo

wm_img_8552

Top View

wm_img_8550

Bottom View

wm_img_8558

Overview / Micro

wm_img_8567

On Micro (with Reset)

wm_img_8577

Surface mount detail

 

Schematics:

schematic_bb

Details:

  1. An LED is included (with its resistor) so that I could verify the any chip works (by flashing Blink).
  2. To successfully flash the chip, an ArduinoISP needs to be flashed onto the Arduino Leonardo / Micro beforehand (so they become a serial programmer).
  3. The RESET pin has to be connected to PIN 10 of Arduino Leonardo or to the Arduino Micro (so that ArduinoISP knows how to reset the attiny85). The shield has the RESET pin laid out so that it inserts into PIN10 of Leonardo directly, but on an Arduino Micro you have to use a wire to hook it up to PIN10 of Micro.
  4. An additional set of “cores” is required for Arduino IDE, so that it recognizes the attiny85 chip. Please see below.

Getting Arduino IDE to see the attiny85 “cores” was not straightforward on Arduino IDE 1.6.5. Just unpacking the attiny-master.zip file into the <ArduinoIDE>\hardware folder did not make the IDE pick up them up. After comparing with the existing <ArduinoIDE>\hardware\arduino\avr\variants\ I decided to try and manually create the folder structure. It now looks like this: <ArduinoIDE>\hardware\attiny\avr\variants\.

Before start using the “cores” and flash the attiny85 chip, the ArduinoISP (provided within the examples of Arduino IDE) has to be flashed to the Leonardo (or Micro) so that they become a serial programmer. Also, another change is still required, described in the previous post (Step 1) so that Arduino IDE uses the correct protocol when talking with the Leonardo / Micro.

If everything is setup correctly, just before flashing the blink code (below, uses PIN4 of attiny85 for the LED), the menu should look like this:

menu_arduino

  • Board -> ATtiny25/45/85
  • Processor -> ATtiny85
  • Clock -> Internal (8MHz). Make sure you don’t select External !
  • Programmer -> Arduino as ISP (Micro/Leonardo)

The second problem was surface mounting the components. Since the ICSP female header had to be soldered, it meant that the copper side of the shield would be on top. To get the chip holder, I put a dab of solder and then soldered the rest. To support the LED again I have soldered just a bit one of the legs – but another idea I’ve been told was to try to use toothpicks. Might have worked just as well.

Few more photos from the build process (photos taken with the mobile phone):

img_20160920_212659_wm

Cutting PCB to size

img_20160920_212719_wm

Pins (RST + ICSP)

img_20160920_220448_wm

Started soldering

img_20160920_220521_wm

Side view

img_20160920_231126_wm

Side view (2)

 

Blink.ino (uses PIN4 on the attiny85 for the led):

If everything works correctly, once the Blink is flashed, the LED on the programmer shield should blink every second.