Arduino Uno to Program ATTINY84 (Arduino V. 1.8.5)


4,118

10

5

Mech Eng

Using the Arduino Uno to program ATTINY84-20PU (Digikey item # ATTINY84-20-PU-ND).
This Instructable shows how to use the Arduino platform to work with physically smaller processors, such as the ATtiny84 (84/44/24). This example is specifically for the ATtiny84-20PU processor but can be adapted for the others boards by selecting the appropriate board from the Arduino software (i.e., Arduino IDE) and modifying the pinouts as required.

(Updated for Arduino 1.8.5)

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Add ATtiny Core Supprt to Arduino IDE Software

For Arduino 1.8.5:

  1. Open Arduino software (aka Arduino Integrated Development Environment [IDE]).
  2. Open preferences: [FILE] --> [PREFERENCES]
  3. Paste URL into Additional Boards Manager URLs: http://drazzy.com/package_drazzy.com_index.json

Step 2: Program Arduino for Use As an In-System Programmer (ISP)

  1. Select Arduino board: [TOOLS] --> [BOARD] -->[ARDUINO/GENUINO UNO] . Note: although I have the Arduino UNO I have replaced the processor with a pre-programmed Atmega328P that requires that I select "Arduino Duemilanove or Diecimila."
  2. Select Programmer: [TOOLS] --> [PROGRAMMER] -->[AVR ISP] .
  3. Open ArduinoISP sketch: [FILE] --> [EXAMPLES] --> [11.ArduinoISP] --> [ArduinoISP]
  4. Upload sketch.

Step 3: Connect ATtiny84 for Programming

Connect the Arduino Pins to the ATtiny84 pins:

  • Arduino 5V to ATtiny84 Pin 1
  • Arduino Pin 10 to ATtiny84 Pin 4
  • Arduino Pin 11 to ATTiny84 Pin 7
  • Arduino Pin 12 to ATtiny84 Pin 8
  • Arduino Pin 13 to ATtiny84 Pin 9
  • Arduino GND to ATtiny84 Pin 14
  • Arduino RESET to 10uF capacitor (+ side / long leg)
  • GND to 10uF capacitor (- side / short leg)

Step 4: Set Arduino to Program ATtiny84

  1. Select Arduino board: [TOOLS] --> [BOARD]
    -->[ATtiny24/44/84]. Now additional board options will appear in the Tools menu next time Tools is opened.
  2. Select B.O.D. disabled: [TOOLS] --> [B.O.D.] -->[B.O.D. Disabled]
  3. Select LTO disabled: [TOOLS] --> [LTO 1.6.11+ only] -->[Disabled]
  4. Select Pin Mapping counterclockwise: [TOOLS] --> [Pin Mapping] -->[Counterclockwise]
  5. Select Chip Attiny84: [TOOLS] --> [Chip] -->[Attiny84]
  6. Select Clock 8MHz: [TOOLS] --> [Clock] -->[8 MHz internal]
  7. Burn bootloader: [TOOLS] --> [Burn Bootloader]

Step 5: Program ATtiny84

  1. Open Blink sketch: [FILE] --> [EXAMPLES] -->[01.Basics]-->[Blink]
  2. Edit sketch:
    1. Prior to void setup(), define pin name (led) and location (pin 0): int led =0;
    2. place “LED_BUILTIN” with “led” in void stetup() and in void loop()
  3. Upload sketch.
  4. Power off and disconnect from Arduino.

Step 6: Connect ATtiny84 to Run As Stand-Alone

  • ATtiny Pin 1 to 5V source (don't actually turn on power yet)
  • ATtiny Pin 2 to LED (long leg)
  • ATtiny Pin 14 to Ground
  • LED (short leg) to Resistor (end 1) between 100 and 1k Ohm
  • Resistor (end 2) to Ground
  • Turn on power to ATtiny84

Be the First to Share

    Recommendations

    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    5 Discussions

    0
    None
    Philip11111111

    Question 11 months ago on Step 4

    When I burn bootloader, I get an error. I am using arduino 1.8.7, could that be a problem?
    Here is the copy of the error message from the arduino IDE:

    Arduino: 1.8.7 (Windows 10), Board: "ATtiny24/44/84, Disabled, ATtiny84, 8 MHz (internal), EEPROM retained, B.O.D. Disabled, Counterclockwise (like old ATTinyCore and x41-series)"
    C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Users\Philip\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.2.1/avrdude.conf -v -pattiny84 -cstk500v1 -PCOM3 -e -Uefuse:w:0xFF:m -Uhfuse:w:0b11010111:m -Ulfuse:w:0xE2:m
    avrdude: Version 6.3-20171130
    Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
    Copyright (c) 2007-2014 Joerg Wunsch
    System wide configuration file is "C:\Users\Philip\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.2.1/avrdude.conf"
    Using Port : COM3
    Using Programmer : stk500v1
    Setting bit clk period : 5.0
    avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xe0
    avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xe0
    avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xe0
    avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
    avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xe0
    avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xe0
    avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xe0
    avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
    avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xe0
    avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xe0
    avrdude done. Thank you.
    Error while burning bootloader.

    Thank you in advance for any help.

    1 answer
    0
    None
    Philip11111111Philip11111111

    Answer 11 months ago

    The solution was to set the programmer to "Arduino as ISP", instead of AVR ISP, or anything else that looks similar in the list. This is in the instructions.

    0
    None
    HankD7

    Question 1 year ago on Step 4

    Thanks for this Instructable. When I get to step 4, I do not get the additional board options. I am using Duemilanove and Arduino 1.8.5. Do you have any suggestions?

    1 answer
    0
    None
    Philip11111111HankD7

    Answer 11 months ago

    I had that problem too. I had to click on <Tools> <Board> <Board Manager>
    and then select a file to install based on the chip I was targeting.

    0
    None
    tsant

    1 year ago

    Thx!