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.
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.
Hello Lukas,
can you please tell me what to do ?
I follow your instructions, Chinese USBASP is flashed.
BUT then the verifying process gives me that:
avrdude: set SCK frequency to 500 Hz
avrdude: error: programm enable: target doesn’t answer. 1
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x656675
avrdude: Expected signature for ATtiny13 is 1E 90 07
Hi
Very thanks for this pos.it solve my usb asp error.
I connected slow sck pins and my usb asp work.
Stupidest community ever, I have f**kn 3 arduinos and 1 USBasp , and all of their bootloaders are f**ked. And Now I need to buy another Arduino or, UsbAsp. F**k that. Get f**ked. F**kn imbeciles, year 2020, still we need billions of tiny devices to update each others firmware. A fuckn usb device needs another f**kn usb device to update itself. Bullshit
Hey, thanks for this tutorial and nice website 🙂
Worked well – now have attiny13a running at 128khz no problem, nice one Łukasz!
Great! 🙂
/L
Could you explain why you are using avrdude with “-p attiny13” in some places and “-p atmega8” in others?
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.