Project tutorial
ATtiny13/13a/25/45/85 Programming Shield

ATtiny13/13a/25/45/85 Programming Shield

Compact board to program an ATtiny using an Arduino UNO.

  • 6,357 views
  • 0 comments
  • 9 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)
Dremel
Sandpaper

Apps and online services

About this project

ATtiny13/13a/25/45/85

Program an ATtiny using an Arduino. Minimal soldering experience required.

Purpose

Unlike the Arduino UNO, the ATtiny cannot receive programs via USB. The UNO uses the ATmega16U2, a secondary MCU, to convert serial via USB to UART to program the ATmega328. We will take advantage of the ATmega16U2 on the UNO to program an ATting13A.

Basic electronics knowledge including knowing how to use a multimeter or how to read schematics is recommended.

Features

  • Arduino UNO shield
  • Socket for easy install & removal
  • Headers for testing

Preparation

Connections can be found here or below.

  • ATtiny pin 1 (PB5) <--> Arduino pin D10
  • ATtiny pin 2 (PB3) <--> x
  • ATtiny pin 3 (PB4) <--> x
  • ATtiny pin 4 (GND) <--> Arduino GND
  • ATtiny pin 5 (PB0) <--> Arduino pin D11
  • ATtiny pin 6 (PB1) <--> Arduino pin D12
  • ATtiny pin 7 (PB2) <--> Arduino pin D13
  • ATtiny pin 8 (Vcc) <--> Arduino +5V

Follow the pinout diagram below for additional reference.

Below is a collection of photos as I progressed through the build of the shield.

A dremel or rotary tool does quick work of FR4/perfboards. Sandpaper is also effective to deburr and round edges.

Soldering

A DIP8 socket will allow quick connect & disconnect of the ATtiny. The rows of female headers is optional. It's purpose is to be able to immediately test pins.

My board was single sided, which forced me to get creative with soldering the pins that go into the Arduino UNO.

If using a strip board, be sure to cut traces where the connection should end. Perfboards, on the other hand, will require jumper wires to form the connections.

Add a 10uF electrolytic capacitor between the Arduino's Reset pin and Ground. Folding down the capacitor reduces its footprint. Confirm all connections and breaks with a multimeter in continuity mode.

*OPTIONAL* I installed an LED with a series resistor on pin 2 aka PB3/D3.

The shield will look something similar to the pictures below.

Uploading Code

1. Arduino as ISP

  • Plug in the UNO, select the correct COM port and board.
  • Arduino IDE > File > Examples > ArduinoISP > ArduinoISP > Upload

2. ATtiny Hardware Package Installation

  • File > Preferences > Additional Boards Manager URL > Paste:
https://raw.githubusercontent.com/sleemanj/optiboot/master/dists/package_gogo_diy_attiny_index.json
  • OK
  • Tools > Board > Boards Manager > Find "DIY ATtiny" > Install

3. Configure Settings

  • Make sure your settings match the image below. I used an ATtiny13A.

4. Test Code

  • Download the "ATtiny Blink" sketch provided at the bottom of the guide and upload it.
  • Observe if LED toggles every second.

Conclusion

Congratulations! The shield is complete. If you wish to print the enclosure used on the UNO, you can find it here (Note that it was designed around genuine boards without multiple rows of header pins). Happy tinkering.


Code

ATtiny BlinkC/C++
/*
 * Viktor Silivanov
 * 9/4/2018
 * 
 * ATtiny13A Pinout
 * https://camo.githubusercontent.com/54658102e904b5d7efc931168f7f0afaa12a347f/687474703a2f2f692e696d6775722e636f6d2f71524564564d622e6a7067
 * 
 * Pin # | Assignment | PWM | Serial |
 *   1   |   D5/A0    |  x  |   x    |
 *   2   |   D3/A3    |  x  |   x    |
 *   3   |   D4/A2    |  x  |   x    |
 *   4   |    GND     |  x  |   x    |
 *   5   |     D0     |  Y  |  MOSI  |
 *   6   |     D1     |  Y  |  MISO  |
 *   7   |   D2/A1    |  x  |  SCK   |
 *   8   |    VCC     |  x  |   x    |
 * 
 */

#define LED       3        //D3 = Pin 2 in DIP8 package

void setup() {
  pinMode(LED, OUTPUT);
}

void loop() {
  digitalWrite(LED, HIGH);
  delay(1000);
  digitalWrite(LED, LOW);
  delay(1000);
}

Comments

Similar projects you might like

Programming the ATtiny85 (Using an Arduino Uno)

Project tutorial by Ian Cumming

  • 3,686 views
  • 3 comments
  • 7 respects

Programming Atmel AT89 Series Via Arduino

Project tutorial by Patel Darshil

  • 12,372 views
  • 2 comments
  • 19 respects

Simple ATTiny13 Shield for Arduino UNO

Project showcase by Hugo Blanc

  • 1,514 views
  • 0 comments
  • 4 respects

BLUE_P: Wireless Arduino Programming Shield

Project tutorial by Shubham Shinganapure

  • 2,626 views
  • 10 comments
  • 20 respects

Programming ATtiny85 with Arduino Uno

Project tutorial by Arjun Ganesan

  • 305,673 views
  • 89 comments
  • 236 respects

Hacking Qualcomm (Quick Charge) QC 2.0/3.0 With ATtiny85

Project tutorial by Shahariar

  • 15,389 views
  • 15 comments
  • 47 respects
Add projectSign up / Login