How to program ATtiny85 with Arduino UNO step by step

Hello and welcome back. In this tutorial, we will learn how to program ATtiny85 with Arduino UNO. Also, I used two examples for that. If you find a very cheap powerful microcontroller. Yes, this is the best answer for you. And also, I will guide you step by step on how to use this ATtiny85 microcontroller through this tutorial. OK let’s go ahead. If you want to refer to this microcontroller’s datasheet. You can use this link. Also, you can find out more using the link above.

This ATtiny85 microcontroller has three analog pins and two PWM pins. Also, we can program it using the ISP protocol with the Arduino UNO board. In this tutorial, I will explain it using two LED blinking examples. I think this microcontroller is good for low-cost projects. Also, you can use it for any kind of project. But it depends on your knowledge.

PIN diagram of the ATtiny85 microcontroller

Okay, we’re going to learn how to program it step by step. The required components are as follows and you purchased them using these links

Step 1

Firstly, identify these components.

Step 2

Secondly, upload the ArduinoISP program to the Arduino UNO board. For that, follow the pictures below.

Step 3

Thirdly, include the additional board manager URL and install the ATtiny board package. The URL is below.

  • https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json

Step 4

Now, Connect the ATtiny microcontroller to the Arduino UNO board. For that, use the circuit diagram below.

Step 5

Then, select board and port. After, select the programmer as “Arduino as ISP” and click the Burn Bootloader.

OK, the ATtiny microcontroller is ready to work.

First example

Step 1

First, upload the LED blink program to the ATtiny board. It is as follows. I used pin 0 for that.

  • The full program of this project — Download
void setup() {
  pinMode(0, OUTPUT);

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

Step 2

Next, select board and port. After, upload this code.

Step 3

OK, now connect the LED bulb to the ATtiny board. For that, use the circuit diagram below. If you want you can use this ATtiny board without an Arduino UNO board. In this case, please provide a stable 5v power supply to the ATtiny board.

Second example

Step 1

First, connect the ATtiny board to the Arduino board. The circuit diagram is below.

Step 2

Now, let’s create the program. This is a simple 5 LED chaser program. It is as follows.

  • The full program of this project — Download
void setup() {
  pinMode(0, OUTPUT);
  pinMode(1, OUTPUT);
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);

}
void loop() {
  for (int a = 0; a < 5; a++) {
    digitalWrite(a, HIGH);
    delay(50);
    digitalWrite(a, LOW);
    delay(50);
  }
}

Step 3

Then, select board and port. After, upload this program to the ATtiny board.

Step 4

After, connect the five LEDs to the ATiny board. Also, now you can use it without an Arduino UNO board. The circuit diagram is below.

OK, enjoy this tutorial. The full video guide is below. So see you in the next project or tutorial.

How to program ATtiny85 with Arduino UNO step by step

Similar Posts

2 Comments

  1. At last many more trial of other link… I have Done the attiny burn successfully as per your easy instructions .. thanks

Leave a Reply

Your email address will not be published.