Burn Bootloader Attiny85
How to Burn Bootloader and Attiny85 Program Using Arduino ISP – Attiny85 is a very popular mini size microcontroller.
In addition, there is also attiny13 which has the same physical size, but only 1kb flash memory.
If you want to use Attiny13, you can read the article on How to Attiny13 program with Arduino on this website.
Only 8 feet, this tiny microcontroller can be used in various applications.
For example, turn on the lights with a motion sensor, turn on the lights with the remote infrared, open the door with a password, make flash lights and others.
ATTINY85 has the following specifications:
- 8-bit microcontroller
- External frequency up to 20 MHz
- Internal frequency up to 8 MHz, internal PLL up to 16.5MHz
- 8KB Flash Memory
- 512 bytes EEPROM.
- 512 bytes Sram.
- 10-bit ADC 4-Channel
- 8-pin with 6-pin I / O
- Operating voltage starts 1.8V – 5.5V
Download Library
To be able to install the library there are two ways, namely through the URL Board Manager on Arduino IDE and install the Manual in the Arduino folder.
Install using Board Manager
- Open Arduino IDE software
- Open File> Preferences
- In the Additional Boards Manager Urls, enter the link below then click OK:
http://drazzy.com/package_drazzy.com_index.json
- Open Menu Tools> Board> Boards Manager
- Please wait for the downloaded file.
- Look in the search list with the name ATtinyCore, then click Install.
- After the board is installed, friends will see the list of the board as in this picture.
Install Manual
- First download this library
- Then extract the zip file.
- Move the Extract Folder to the Folder / Document / Aduino / hardware.
- If the hardware folder doesn’t exist, please make it first.
- Installation is complete.
Wiring ATtiny85 Arduino ISP
To be able to program this attiny85, we use a good Arduino Uno, Nano, Micro and others that support ARDUINO AS ISP. The SPI pin used is:
- PB2 (SCK)
- PB1 (MISO)
- PB0 (MOSI)
- PB5 (reset).
Please follow the circuit below with PIN configuration:
Make Arduino as an ISP
- Open Arduino IDE
- Select the File menu> Examples> 11. ArduinoSP> Arduino ISP
- Select Menu Tools> Board> Arduino / Genuine Uno
- Select the Programmer menu> Avrisp MKLL
- Then click Upload
- Done
The burn of the bootloader program is quite important, it is only quite just at the beginning. It is necessary that attiny85 will be defined all the internal settings of attiny85 such as the size of the frequency value used.
If attiny85 is not bootloader, the performance is not appropriate. For example, we set the ATTINY85 Delay program to turn on and turn 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 attiny85 performance.
How to burn bootloader is:
- Tools > Board > ATtiny85 (Micronucleus / Digispark)
- Tools > Clock > 8 MHz (no USB)
- Tools > Burn Bootloader Method > Fresh Install (via ISP)
- Tools > Programmer > Arduino as ISP (ATtiny Core)
- Tools > Burn Bootloader
- Done
Upload Main Program
- File > Examples > 01.Basics > Blink
- change LED_BUILTIN, using this code :
led = 3;
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
digitalWrite(led, HIGH);
delay(1000);
digitalWrite(led, LOW);
delay(1000);
}
- Connect a LED to PB3 PIN.
- If it blinks for 1 second, the program we have succeeded
Download Datasheet ATtiny85
Thank you for visiting the Chip Piko website. May be this article is useful.