Learn How to Program ATtiny85 and ATtiny13A

Learn How to Program ATtiny85 and ATtiny13A © LGPL

A simple tutorial on programming ATtiny microcontrollers with an Arduino Uno.

  • 3,487 views
  • 0 comments
  • 29 respects

Components and supplies

About this project

Watch the video for a basic tutorial.

You can program literally any attiny microcontroller if you follow these steps

1. Get the Core files for your Microcontroller (in this case we need core files for ATtiny85 and ATtiny13A)

ATtiny85: https://github.com/SpenceKonde/ATTinyCore

ATtiny13A: https://github.com/MCUdude/MicroCore

Download these cores and install them.

2. Now understand the ATtiny's pinout.

3. Spot the ATtiny ICSP pins (MISO MOSI SCK RESET VCC GND) and prepare your Arduino Uno.

4. Upload Arduino as ISP sketch on your Uno board. Now you can use your arduino as an ISP programmer.

Connect the ATtiny85 to your Uno board. (Do not forget to add a 10uf cap on reset and ground of your Arduino.)

Use jumper wire for connections or MAKE A SHIELD USING PERF BOARD AND DIP8 SOCKET.

5. Wire everything together. (WIRING IS SAME FOR BOTH ATtiny85 AND '13A)

VCC to VCC

SCK of ATtiny to Pin 13 of Arduino

MISO of

ATtiny to Pin 12 of Arduino

MOSI of ATtiny to Pin 11 of Arduino

RESET of ATtiny to Pin 10 of Arduino

GND to GND

6. Choose your ATtiny in tools> Board manager

Select the right clock frequency for ATtiny85 select 8 MHz and for ATtiny13A select 9.6 MHz.

Change the programmer to "Arduino as ISP" and then BURN BOOTLOADER.

(Only have to do once for each chip)

7. And now finally you can upload your sketches on your ATtiny by pressing Ctrl + Shift + U or Sketch> Upload using Programmer

"BANG" you have successfully programmed your ATtiny microcontroller.

I hope this was helpful. :-)

Code

codeC/C++
Blink for Attiny13 and 85 (connect led on pin 5 or D0)
void setup() {

  pinMode(0, OUTPUT);
}


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

Schematics

Comments

Similar projects you might like

Programming ATtiny85 with Arduino Uno

Project tutorial by Arjun Ganesan

  • 247,325 views
  • 75 comments
  • 207 respects

Programming the ATtiny85 (Using an Arduino Uno)

Project tutorial by Ian Cumming

  • 2,579 views
  • 3 comments
  • 7 respects

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

Project tutorial by Viktor S

  • 2,513 views
  • 0 comments
  • 8 respects

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

Project tutorial by Shahariar

  • 7,223 views
  • 11 comments
  • 42 respects

3D-Printed Nanoleaf ATtiny85

Project tutorial by Arnov Sharma

  • 1,075 views
  • 0 comments
  • 9 respects

Smallest Arduino in an ATtiny85

by Kristian Blåsol

  • 7,403 views
  • 2 comments
  • 14 respects
Add projectSign up / Login