I recently purchased a cheap USBasp clone (Made in China), originally developed by Thomas Fischl. It is an USB in-circuit programmer for Atmel AVR controllers. It simply consists of an ATMega88 or ATMega8 and a couple of passive components. The programmer uses a firmware-only USB driver, no special USB controller is needed.
No driver is needed under Linux in order to program Amtel chips. With the Arduino IDE, it is enough to connect +5V, GND, MISO, MOSI, SCK and RESET to the respective pins of the microcontroller. However, after uploading a sketch, avrdude complained about an outdated firmware version:
avrdude: warning: cannot set sck period. please check for usbasp firmware update
So I decided to attempt to update the firmware on the USBasp using one of my Arduino UNO boards as the programmer. There is a lot of confusing information on the web about how to do this, so here is what worked for me:
USBasp programming adapters come in different flavors. All of them have several jumpers on board, labeled from JP1 to JPn. Not all of them are populated with pin headers, so it might be necessary to solder the missing jumper pins onto the board, before you can proceed with programming.
According to Thomas Fischl’s schematic, there should be at least three jumpers: JP3 is linked to route the +5 V from the USB bus to pin #2 of the ISP connector. With JP2 linked, the device goes to selfprogramming mode, using a second ISP programmer (in my case an Arduino UNO). With JP1 linked, a slower SCK (< 1.5 MHz) is selected.