Project tutorial

Programming the ATtiny85 (Using an Arduino Uno) © LGPL

Shrinking your Arduino projects saves you money and space! Here I show step by step how to program an ATtiny85 chip.

  • 605 views
  • 1 comment
  • 2 respects

Components and supplies

Apps and online services

About this project

Today, we are going to build a circuit to program an ATtiny85 with our Arduino.

Supplies

We are going to need the following:

  • Some jumper wires
  • 1 x 10 micro farad capacitor
  • The ATtiny85 Chip
  • A breadboard
  • An Arduino

For Extra visual's (that are not really required) I'm going to add:

  • 3 LED's
  • 1 x 330 Ohm Resistor
  • And some extra jumper cables

Before we start with the circuit build, head over to the Arduino IDE.

Arduino Software

Open the Sketch ArduinoISP from the File, Examples and ArduinoISP menus:

  • Verify and upload this sketch to your Arduino

The Arduino software does not natively support the ATtiny85 so we need to add support for it.

  • Open the Preferences Dialog from the File menu.
  • Put the link into the "Additional Boards Manager URL".
  • Click OK!

ATTINY

  • Open the Boards Manager from the Tools, Board Menus
  • Select the ATtiny from the list once the software has updated

Note that you will require an internet connection for the ATtiny board manager to download.

  • Search for ATtiny, either manually scrolling down the list, or typing "attiny" in the filter field.
  • Click Install the (Use the latest version).

Program Setup

Lets set up the program to use the Arduino as a programmer.

  • Select Arduino as ISP from the Tools, Programmer Menus
  • Select ATtiny from the Tools, Board Menus
  • Select ATtiny85 from the Tools, Processor Menus
  • I'm selecting 16Mhz Internal from the Tools, Clock Menu

The chip has 8 pins, to program the ATtiny85 we are interested only 6 of them MISO, MOSI, SCK, RESET, Ground, and Positive.

If you look closely at the chip you will see a dot. This is Pin 1. Pin 2 through 8 follow in an anti-clockwise order around the chip.

Conveniently the headers on the Arduino are easy to work with to program the ATtiny85.

Building the Circuit

We are ready to jump into building the programming circuit:

  • Unplug your Arduino
  • Place the ATtiny Chip onto the breadboard
  • Connect the ground from the Arduino to the Ground Rail
  • Connect the 5V from the Arduino to pin 8 of the ATTINY
  • Connect pin 4 of the chip to ground
  • Place the capacitor between ground and another terminal strip (The anode of the capacitor must be connected to ground)
  • Connect the cathode of the capacitor to the Reset pin of the Arduino
  • Connect a lead from the header pin 10 of the Arduino to pin 1 of the chip
  • Connect Arduino Pin 11 to Pin 5 of the chip
  • Connect Arduino Pin 12 to Pin 6 of the chip and
  • Connect Arduino Pin 13 to Pin 7 of the ATtiny85

Add LEDs

The programmer will now work, but I'm going to add some LED's because LED's are fun to have.

  • Connect the 330k resistor to ground and a terminal strip.
  • Connect Arduino pins 7, 8 and 9 to separate terminal strips.
  • Place LED's between each of the terminal strips (connected to 7, 8 and 9) and to the terminal strip with the 330k Resistor.

Back to Arduino IDE

Head back over to the Arduino IDE. First we need to burn the Bootloader to the chip.

  • Select Burn Bootloader from the Tools Menu.

Once that is done, you can upload Arduino Sketches to the ATtiny chip, as if it were an Arduino.

Just remember the limitations to the ATtiny chip and any program within the limitations will work.

Schematics

Breadboard ATTiny Circuit
The Breadboard view of the circuit to program the ATTiny85
Arduinoispbb cjatb2plpt
Schematic ATtiny Program
The Circuit Schematic of the circuit to program the ATTiny85 Chip
Arduinoispschem kblsqcmipf

Code

ArduinoISP
The github entry for the ArduinoISP,ino This file is also available from within the ArduinoISP under File >Examples >ArduinoISP

Comments

Similar projects you might like

Magic Lamp

by Nekhil ravi

  • 1,151 views
  • 3 comments
  • 12 respects

PuzzleBox

Project tutorial by Arduino

  • 424 views
  • 0 comments
  • 2 respects

Arduino MKR GSM 1400 and DTMF

by Arduino_Genuino

  • 4,218 views
  • 0 comments
  • 9 respects

Love You Pillow

Project tutorial by Arduino

  • 2,826 views
  • 0 comments
  • 5 respects

Arduino Yun Controller

Project showcase by TATCO Inc

  • 235 views
  • 0 comments
  • 3 respects
Add projectSign up / Login