How to update AVR USBasp firmware to latest version

The common reason why you would like to update this firmware is unlock slow-sck function for cheap (e-bay or Aliexpress) USBasp programmers, like this one on the picture. The slow-sck function allows to program AVR chips running at very low frequency clock source (i.e. 128kHz).

When your USBasp programmer prints that warning it means that firmware update is required!

avrdude -p attiny13 -c usbasp -B 1024 -F -P usb

avrdude: set SCK frequency to 500 Hz
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: program enable: target doesn't answer. 1 
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x685ba2
avrdude: Expected signature for ATtiny13 is 1E 90 07

avrdude done. Thank you.

What You Need

  • two USBasp programmers (first one require update, and second to burn the chip of first one)
  • one jumper, two 2×1 pin headers and soldering iron (optionally, depends on your programmer type)

USBasp Programmer Preparation

We need to set a jumper JP2 for USBasp programmer we want to update. This jumper will enable “ISP self-programming”. It may happen that you will need to add to PCB a missing pin-header for a JP2 . Same with pin-header for a jumper JP3 which will enable “Slow-SCK” when we will have firmware updated. Eventually, make a short connections on PCB if there is no place for pin-headers.

Figure-1 AVR USBasp programmer board (source: tosiek.pl)

Figure-2 AVR USBasp programmer schematic

Downloading the latest firmware

The software is maintained by Thomas Fischl, the author of USBasp programmer, and can be found on his official download page – https://www.fischl.de/usbasp/.

cd $HOME
wget https://www.fischl.de/usbasp/usbasp.2011-05-28.tar.gz
tar -xvf usbasp.2011-05-28.tar.gz

Flashing the chip of USBasp programmer

At this step we’re sure that jumper JP2 of the first programmer which we want to update is on its place (while JP3 is not set). Now, we will use second USPasp programmer to burn the new firmware into first programmer’s chip. So, we need to connect first USBasp programmer and second programmer using IDC-10 sockets and then connect second programmer to a computer using USB socket.

cd $HOME/usbasp.2011-05-28
avrdude -p atmega8 -c usbasp -U flash:w:bin/firmware/usbasp.atmega8.2011-05-28.hex:i -F -P usb

Verifying

After firmware update, we need to unset jumper JP2 and set JP3 (Slow-Clock).

avrdude -p attiny13 -c usbasp -B 1024 -F -P usb

avrdude: set SCK frequency to 500 Hz
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9007 (probably t13)

avrdude: safemode: Fuses OK (E:FF, H:FF, L:7B)

avrdude done. Thank you.

That would be all! Now, if JP3 is set, you can programm AVR chips running with very low frequencies.

2 thoughts on “How to update AVR USBasp firmware to latest version

  1. Hi Łukasz,
    thx for this blog post. It seems like solution of my problem.
    My question is: Is it necessary to have one ORIGINAL programmer, or the solution is functional with two Aliexpress USBasps?

    P.S. Captcha is terrible

    • Hi Petr, I’ve tested scenario with two aliexpress USBasps and it works fine.

      P.s. I know that captcha is ugly solution but it helps me a lot to filter comments.

Leave a Comment