Bootloader vs Programmer

The ICSP programmer is needed when writing the bootloader or if you want to save program flash space and only program your ATtiny using the ICSP.

When programming the ATTiny using the bootloader you use the TX/RX serial port (the ATTiny should be connected to your USB-serial adapter). The ICSP programmer doesn’t need to be connected.

Using the “Upload using Programmer” option (SHIFT+Upload), instead of the normal serial port Upload wipes out the bootloader. However it doesn’t wipe out the config fuse settings as it seems these are only set when using “Burn Bootloader”.

Using Crystal

Note that when programming from the ArduinoIDE the fuse bits are not set by SHIFT+Upload button. To program them select Menu > Tools > Burn Bootloader

Adding ATtiny IC’s to Arduino IDE

ATTinyCore – ATtiny441/841/1634 + most other ATtiny’s

https://github.com/SpenceKonde/ATTinyCore

Menu > File > Preferences > Additional Boards Manager URLs > Paste the following URL into the field (use a comma to separate it from any URLs you’ve already added):
http://drazzy.com/package_drazzy.com_index.json

Menu > Tools > Board > Boards Manager…
Find “ATTinyCore by Spence Konde” and install it.

ATtiny24/44/84/25/45/85 (Spence Konde one above also has these ATtiny’s)

https://github.com/damellis/attiny

Menu > File > Preferences > Additional Boards Manager URLs > Paste the following URL into the field (use a comma to separate it from any URLs you’ve already added):
https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json

Menu > Tools > Board > Boards Manager…
Find “attiny by David A. Mellis” and install it

Programming Using Arduino IDE

Menu > Tools > Board: ATtiny##
Menu > Tools > Processor: Select the processor
Menu > Tools > Clock: Select the clock you want to use
Menu > Tools > Programmer: USBasp (ATTinyCore) or USBTinyISP

First time programming

Use “Burn Bootloader” to burn the config fuses (even if you won’t use the bootloader afterwards and will overwrite it by programming using the programmer

Programming use programmer (Not via serial port)

Then to program your Arduino with your current sketch click the upload button as normal, but whilst doing so hold down the shift key. This causes it to use the programmer (you can hover over the button with the shift key held and it will confirm ‘Upload using programmer’).

Burning the bootloader

Note that when uploading sketches using the programmer only the sketch will be uploaded, not the bootloader. If at any point you need to reprogram the bootloader back into your Arduino then use Tools->burn bootloader making sure you have the correct board type set.

Programmers from Arduino IDE

USBtinyISP

On windows you need a driver, Adafruit has a “Windows USBtinyISP signed driver”: https://learn.adafruit.com/usbtinyisp/download

You don’t need to run the exe, instead plug in the programmer, Windows will fail to install drivers for it. Then in Windows Device Manger find USBtiny in “Other devices”, select “Update driver”, browse to the unzipped driver folder and let windows install it. Once installed correctly the USBtiny will move to folder “Atmel USB Devices” in Device Manager

Connecting USBtinyISP to the ATtiny
USBtinyISP   Function   ATtiny84
1 MISO 8
2 VCC 1
3 SCK 9
4 MOSI 7
5 Reset 4
6 GND 14

USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.

Comments

  1. Larry E, Hamilton, Mt.

    3 years ago

    I have spent quite a few hours learning to use Arduino Create, Arduino IDE, avrdude, ftdi usart interface, USBisp and USBasp with Adruino Pro Mini and Atmel attiny processors.
    This page and others you host would have been very helpful.
    Thanks for the help.

  2. Zonker Harris

    3 years ago

    I started with the damellis ATTiny board files and the Sparkfun 11801 USBTinyISP board. It worked fine with newer Dr Azzy board files… but with the recent updates in both ArduinoIDE and Dr Azzy descriptions, the USBTunyISP Fast and Slow programmer options *both* want to have a COM port designated, and the Sparkfun board cannot be used. Is that an oversight (maybe a bug) or planned obsolescence? The device manager finds it as FabISP, and Zadig can rename it, but that doesn’t help. How can I file this question where @SpenceKonde will find it?

Leave a Reply to Larry E, Hamilton, Mt. Cancel reply

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