How to program an Attiny85 or Attiny84: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(33 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[File: | [[File:IMG_1214_small.png | right ]] | ||
==Prerequisite== | |||
* Arduino IDE | * Arduino IDE 1.8.4 or higher is installed - [https://www.arduino.cc/en/Main/Software Download] | ||
* You have a programmer board | * You have a programmer board - [http://lechacalshop.com/gb/various/25-ftdi-arduino-programmer-attiny-atmega.html NanoProg.] | ||
==Tiny Core Library== | |||
We recommend the tiny core library from this link below. | We recommend the tiny core library from this link below. | ||
https://github.com/SpenceKonde/ATTinyCore | |||
Download it and install it in the sketchbook/hardware folder. Follow instructions in the README file for this. | Download it and install it in the sketchbook/hardware folder. Follow instructions in the README file for this. | ||
==Connect the hardware== | |||
===For Attiny85 DIP8=== | |||
Insert the Attiny85 MCU on the DIP8 socket of the Nanoprog. Beware of the direction when the inserting the MCU. The small dot must be pointed toward the inside of the board. | |||
[[File:IMG_1141_small.png | 300px]][[File:IMG_1142_small.png | 300px]] | |||
===For Circuit with ISP port=== | |||
Connect the | * Connect the NanoProg to the USB port of the computer. | ||
* Connect the 6 pin ribbon cable to the ISP port of the board to program. Make sure grounds are connected together. | |||
[[File:IMG_1140_small.png | 300px]][[File:IMG_1139_small.png | 300px]] | |||
==Initial Setup== | |||
Make sure '''Arduino as ISP''' is selected in '''Tools | Programmer''' menu. | |||
[[File:Tools_prog_ard.png | 150px]] | |||
==Bootloader== | |||
If programming the MCU for the first time you must burn the bootloader onto it. For this first select the appropriate board in the Arduino IDE. '''Tools''' | '''Board''' | '''ATtiny24/44/84'''. Then select '''Tools''' | '''Burn Bootloarder'''. | |||
==Upload Sketch== | |||
===Attiny85 Attiny84=== | |||
* Open your sketch file with the Arduino IDE. | |||
* In '''Tools | Board''' select '''ATTinyCore | ATtiny 24/44/84(a) (no bootloader)''' | |||
* Upload the sketch from the IDE. | |||
===Atmega=== | |||
* Open your sketch file with the Arduino IDE. | |||
* Make sure you select the appropriate MCU type in '''Tools | Board'''. Usually '''Arduino UNO'''. | |||
* To upload select '''File''' | '''Upload Using Programmer'''. | |||
Do not use '''Upload''' as it will reflash the programmer itself. (reflash again using Arduino as ISP sketch is it happens) |
Latest revision as of 07:41, 1 June 2021

Prerequisite
Tiny Core Library
We recommend the tiny core library from this link below.
https://github.com/SpenceKonde/ATTinyCore
Download it and install it in the sketchbook/hardware folder. Follow instructions in the README file for this.
Connect the hardware
For Attiny85 DIP8
Insert the Attiny85 MCU on the DIP8 socket of the Nanoprog. Beware of the direction when the inserting the MCU. The small dot must be pointed toward the inside of the board.
For Circuit with ISP port
- Connect the NanoProg to the USB port of the computer.
- Connect the 6 pin ribbon cable to the ISP port of the board to program. Make sure grounds are connected together.
Initial Setup
Make sure Arduino as ISP is selected in Tools | Programmer menu.
Bootloader
If programming the MCU for the first time you must burn the bootloader onto it. For this first select the appropriate board in the Arduino IDE. Tools | Board | ATtiny24/44/84. Then select Tools | Burn Bootloarder.
Upload Sketch
Attiny85 Attiny84
- Open your sketch file with the Arduino IDE.
- In Tools | Board select ATTinyCore | ATtiny 24/44/84(a) (no bootloader)
- Upload the sketch from the IDE.
Atmega
- Open your sketch file with the Arduino IDE.
- Make sure you select the appropriate MCU type in Tools | Board. Usually Arduino UNO.
- To upload select File | Upload Using Programmer.
Do not use Upload as it will reflash the programmer itself. (reflash again using Arduino as ISP sketch is it happens)