Flashing the bootloader with USBtinyISP/avrdude

First make sure the chip sits on the PCB properly and the quartz with load capacitors is on there too. Then connect to the board with the 6pin header. Pin 1 is marked by the red wire. Make sure it is aligned with pin 1 on the PCB.

In contrast to what is shown in the picture, REMOVE the 3 jumpers on the right. This disconnects everything connected to the SPI lines and avoids interference with the programming process. When you’re done with flashing the bootloader/code, put the jumpers back on.


To check if USBtinyISP/avrdude see the chip use this:

Unlocking the chip and writing the fuses on a blank chip. The fuse settings were taken from the bootloader Makefile of Arduino-IDE V15 and are for the ATmega168 chip.

Flashing the bootloader and locking the chip:

Alternatively you can use the Arduino IDE and just select Tools–>Burn Bootloader–>w/ USBtinyISP

A tutorial for USBtinyISP by ladyada. Has helped me a lot.

In case you get timeout errors you can try setting the bitclock avrdude uses to a slower speed. Try something like “-B 20” for a start. Increasing the number makes it slower. If avrdude doesn’t seem to want to talk to the chip at all, make sure your wiring is OK and that you have a crystal or other suitable clock source connected to the chip. Chips from factory “should” run with the internal oscillator, but so far I’ve had to use a crystal with every single one I got. If the chip doesn’t get the clock source it is configured to use (by the ominous fuse settings), it won’t work as the chip is halted.

Please also have a look at my projects page.

This entry was posted in Arduino., Electronics. and tagged , , , , . Bookmark the permalink.

3 Responses to Flashing the bootloader with USBtinyISP/avrdude

  1. robert says:

    Hmmm. I didn’t put the FTDI-chip onto the boards, so you’d have to build an adapter board that holds the chip and connect that to the ICSP header. The ICSP header on my boards is exactly the same as on the Arduino.

    So I think it should work if you build an FTDI-chip-board for it.


    Such an adapter already exists ! The X3 connector on the Diecimila uses the CTS,DSR,DCD and RI lines of the FTDI chip. These are all available on this breakout board. So you could turn it into an USB/TTL cable for normal upload and a bitbang programmer.

  2. Pingback: My 2µF » Getting auto reset to work with FTDI cables on Linux (MAC)

Comments are closed.