Tuesday, July 30, 2019

How to Run Arduino Code on 8 PIN ATTiny Microcontroller - Program ATTiny using Arduino UNO

In previous post we've seen how to shrink Arduino Projects by using ATtiny MCU instead of Arduino UNO board.

What's it all about?
In many cases, you need to run Arduino code on smaller devices. You have that large Arduino UNO Board that costs about $14 but you need to use only one or two pins to control something simple as a relay or an LED.

Then why wasting your precious Arduino board you can use for development and research on that simple project?

Instead, you can use that cheaper ATTiny Microcontroller with the same performance.

This can be both cost and size effective solution. And also you saved your beloved Arduino UNO board for more projects to try.

In this post, we'll see how to simply program ATTiny Microcontroller using Arduino UNO board.

Program ATTiny using Arduino UNO
This setup can be used to program any ATTiny Microcontroller ( ATTiny45 or ATTiny85 ).


- Arduino
- Breadboard
- ATtiny85 (or ATtiny45)
- 10uF electrolytic capacitor
- 220ohm 1/4 watt resistor

- hookup wire

Circuit Connection:

Connect the Arduino to the ATtiny as follows:

Arduino +5V      ---  ATtiny Pin 8
Arduino Ground ---  ATtiny Pin 4
Arduino Pin 10   ---  ATtiny Pin 1
Arduino Pin 11   ---  ATtiny Pin 5
Arduino Pin 12   ---  ATtiny Pin 6

Arduino Pin 13   ---  ATtiny Pin 7

Prepare the Programmer:

In this step, you start by programming Arduino UNO with code to set it as an ISP programmer.

ATTiny Core Files:
Download files from here

Code Upload:


And that's concludes this simple circtiut that can be used to program ATTiny using Arduino UNO to run Arduino Code.
Thank you for reading.