Using the Arduino as a In System Programmer (ISP)

The great advantage of the Arduino is that we don't need a separate programmer. Arduino boards, such as the UNO, can be programmed directly from the Arduino environment by a serial interface. An In System Programmer (ISP) is still required for programming the smaller ATtiny chips, which have no serial interface, such as the 8pin ATtiny85.

ATtiny ICs can be programmed while they are already assembled in the product (system), by the four ISP pins on the chip and a connect cable to an ISP programmer. But if in system program isn't possible, they must be separately programmed before on an IC socket on the ISP programmer. Both are possible with this ISP programmer.

The programmer described here can do 2 things:

a. Burn all types of ATtiny chips: 8, 14 and 20 pins.

b. Burn the Arduino bootloader. Since burning the bootloader works same way as burning ATtiny chips, we can also burn the Arduino bootloader into an ATmega168/328 with this programmer. 

The programmer works together with an Arduino (Uno) board. Note that we may burn a bootloader in some Attiny chips too, I have not further investigate this.

Arduino ISP circuit

There exists several circuits; some use components such as a capacitor between reset and ground, these parts are omitted. 

The crystal, C2, C3, R1 and LED1 are for testing the chip after burning; these parts are optional.

Arduino In System Programmer (ISP) shield + bootloader burner
Arduino In System Programmer (ISP) shield + bootloader burner

Arduino ISP + bootloader burner PCB

Arduino ISP + bootloader burner PCB
Arduino ISP + bootloader burner PCB

If there is sufficient demand, I can design and manufacture bare PCBs (without components) and sell them, let me know if you're interested. The price would be €15 with free shipping worldwide.

Change the Arduino UNO into an ISP

The first step for burning the Arduino bootloader or burning ATtiny chips is to change the Arduino (UNO) into an ISP.

  • Download ATTinyCore and extract it.
  • Install always the latest Arduino software. 
  • Copy the entire "tiny" folder to \arduino-1.0.4\hardware\ (for version 1.0.4). This completes the board list in Extra > Board with the ATtiny chips.
  • Open the folder C:\Projects\Arduino\hardware\tiny and rename Prospective Boards.txt to Boards.txt.
  • Start Arduino with the Arduino board connected to the USB.
  • Tools > Board > select your Arduino board as usual, for instance Arduino Uno.
  • File > Examples > ArduinoISP.
  • Do not insert the program board.
  • Upload the ArduinoISP sketch to the Arduino.
  • The Arduino is a ATtiny programmer now.

Burning the Arduino bootloader

Now we can burn the bootloader. Insert the ATmega chip, blank or not, and than do: Tools > Burn Bootloader. 

Burning the ATtiny

See also here:

  • Insert the program board with the ATtiny chip into the Arduino.
  • Check if the heartbeat LED blinks now, if not, disconnect the Arduino and connect again.
  • Extra > Board > select your ATtiny chip, for instance "Attiny85 @ 1MHz (internal oscillator; BOD disabled)".
  • Extra > Programmer > select Arduino as ISP.
  • Upload the example blink program, see below.
  • Ignore two error messages: "avrdude: please define PAGEL and BS2 signals in the configuration file for part ATtiny85".
  • The test LED should blink now, the on and off time is 1 sec.
# define ledPin 4
void setup() 
{ pinMode(ledPin, OUTPUT);     
void loop() 
{ digitalWrite(ledPin, HIGH);   
  digitalWrite(ledPin, LOW);   

ATtiny45 pin1 used as PB5 or ADC0

As the other ATtiny pins, pin 1 can be used as for instance an I/O line PB5 or an analog input ADC0. But with the Arduino program environment, pin1 can't be used for other purposes. When pin1 is changed once, the chip can't be programmed anymore with the Arduino. So we have to live with just 5 available pins.

Setting the internal ATtiny clock

The fuse bits of the ATtiny, which configures the internal clock, are automatically set by selecting the chip: "Attiny85 (internal 1 MHz clock)" /  "Attiny85 (internal 8 MHz clock)". Note that this influences the timer functions such as delay(). 


Do you have any comments? Please let me know.
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.