Burn Bootloader Attiny13 Arduino

Posted on

Program ATTiny13 Using Arduino

How to Burn Bootloader and Attiny13 Program with Arduino – If you want to find a microcontroller with simple use, microcontroller attiny is a choice. One is attiny13.

With features that are not much different from Attiny85, at a cheaper price than Attiny13 can store a program of 1kb. With the size of a memory flash the size of 1kb is enough if you make a simple program.

If you want to use attiny85, you can read the article How to Burn Bootloader and Attiny85 Program Using Arduino ISP.

The use of this Attiny13 microcontroller varies, such as turning on the lights with a motion sensor, turning on the lights with remote infrared, opening the door with a password, making a flash lights and others.

Attiny13 has the following specifications:

  • 8-bit microcontroller
  • External frequency up to 20 MHz
  • Internal frequency up to 9.6 MHz
  • 1kb flash memory
  • 64 bytes EEPROM.
  • 64 bytes Sram.
  • 10-bit ADC 4-Channel
  • 8-pin with 6-pin I / O
  • Operating voltage starts 1.8V – 5.5V

ATTiny13 PinOut

Pinout of attiny13 is as follows:

To program burn bootloader attiny13, we use a Arduino Uno, Nano, Micro and others that support ARDUINO AS ISP. The SPI pin used is:

  • PB2 (SCK)
  • PB1 (MISO)
  • PB0 (MOSI)
  • PB5 (reset)

Install Library

To be able to install the library burn bootloader attiny13, there are two ways, through the Board Manager at Arduino IDE and install the Manual in the Arduino folder. The thing that must be noticed is, this library only supports Arduino IDE 1.6.4 or above.

a. Install using Board Manager

  • Open Arduino IDE software
  • Open File> Preferences
  • At the Additional Boards Manager Urls, enter the link below then click OK:
  • Open Menu Tools> Board> Boards Manager
  • Please wait for the downloaded file.
  • Look at the search with the name MicroCore, then click Install.
  • After the board is installed, friends will see the list of the board as in this picture.
  • Instalasi successful.

b. Manual Install

  • First download this library:

Download Library ATtiny13

  • Then extract the ZIP file. – Move the extract folder to the folder / Documents / Aduino / hardware
  • If the “hardware” folder doesn’t exist, please make it first.
  • Open Arduino IDE, Select Tools> Board (see two images above).
  • Installation is complete.

ATtiny13 Arduino Wiring

Before we started to program attiny13, follow the circuit below with PIN configuration:

Let’s Program ATTiny13

1. Make Arduino as an ISP

  • Open Arduino IDE
  • Select the File menu> Examples> 11. ArduinoISP> Arduino ISP
  • Select Menu Tools> Board> Arduino / Genuine Uno
  • Select the programmer menu> avrisp mkll
  • Then click Upload
  • Finish

2 Burn a Bootloader

Burn a bootloader program is quite important and only just once at the beginning.

It is necessary to make attiny13 will be defined all internal settings of attiny13 such as the size of the frequency value used.

If Attiny13 is not done by bootloader, the performance is not appropriate. For example, we set the Attiny13 program delay turning and turning off the lights is for 1 second. If there is no bootloader, the program can run with 1.5 or 2 seconds delay.

This will have an impact on all attiny13 performance.

  • Select Menu Tools> Board> ATTINY13
  • Select Menu Tools> Programmer> Arduino as ISP
  • Select the Tools> Burn Bootloader menu
  • Finish

3 Upload Main Program

  • Select the File menu> Examples> 01.basics> Blink
  • Replace the word LED_Builtin, follow this program:
led = 3;

void setup() {
pinMode(led, OUTPUT);

void loop() {
digitalWrite(led, HIGH);
digitalWrite(led, LOW);
  • Connect a LED to PB3 PIN.
  • If it blinks for 1 second, the program we have succeeded.

Download Datasheet ATtiny13

I hope this article is useful

1 comment

Leave a Reply

Your email address will not be published. Required fields are marked *