USBASP is a well-known USB programmer for Atmel AVR microcontrollers initially supported by Thomas Fischl. USBasp flash uploader is made of an Atmega8 or Atmega88 and few other components, including resistors, capacitors, LEDs, and connectors.
The adapter works on a firmware driver, which gives room for customization, and new chips updates.
The USBasp programmer has been so famous for a long time. It has been supported by avrdude – an open-source programming software, which runs on multiple platforms like Windows, Linux, or Mac. Since Arduino’s popularity has skyrocketed, the need for such tools has diminished, and so the support has been stopped. I can assure you that USBasp still works and there is no problem running it on Windows 10.
USBasp circuit diagram
Let us see what is this adapter is made of and how to set it up to run on Windows 10.
You can find the original circuit on the author’s site: http://www.fischl.de/usbasp/. There you will also find several third-party PCB examples to choose from.
Clik here to view.

The USBasp adapter is an Atmega8 (or Atmega88) microcontroller clocked with a 12MHz crystal. The assembled PCB is ready to be connected via a simple USB B-type cable (PC side needs A type of connector). If you decide to build a new board, I strongly recommend making it a micro USB, as USB-B has almost vanished.
- Resistors R2 and R6 are current limiting resistors that protect the PC or hub USB port.
- R7 helps the computer to recognize a USBasp device as LS (Low Speed).
- Diodes D1 and D2 indicate data transfer.
The ISP connector for USBasp
Header SV1 is compatible with STK200/300. Just 4 and 6 pins are used for RXD and TXD that may be used for other purposes).
Clik here to view.

You can use an adapter from 10 pin header to 6 pin ISP header, which is more common in many AVR boards such as Arduino.
Clik here to view.

Another option is to select wires and solder directly to 6-pin header.
USBasp adapter jumper settings
SCK signal can work at two selectable frequencies, 1.5MHz and 8MHz, selected with a Jumper JP3. If Jumper is unconnected, then SCK speed is 8MHz. Low-speed SCK is only required when MCU is clocked with a low-speed oscillator like 32kHz.
Clik here to view.

Jumper JP1 is used for programming the USBasp adapter via ISP. Moreover, the last Jumper JP2 is used for powering the adapter from the USB port (not recommended).
Assembled USBasp adapter:
Downloading a firmware for USBasp
Clik here to view.

To make this adapter work, you need to program Atmega8 with the latest firmware, which can be downloaded from http://www.fischl.de/usbasp/ page (usbasp.2011-05-28.tar.gz (519 kB)). The last updated version is dated 28 May 2011. If you want to program the chips that were manufactured later, you will probably fail. Keep in mind that USBasp will only work with chips up to date.
Installing Windows 10 drivers for USBasp
Setting up a USBasp adapter in Windows 10 system may be a bit trickier because the included Windows drivers will not work – they even will not install. Luckily there is a great workaround to make it work. All you need is to download a USB installation tool – Zadig. It will establish a libusb-win32 driver that works just fine in Windows 10.
Before installing drivers, be sure to upload firmware first, then connect the USB cable to the adapter and PC.
- Connect cable directly to the USB port of computer avoiding Hubs (it may work with a hub, so be aware);
- Then start Zadig program that you downloaded and select libusb-win32 as in image below:
Clik here to view.

After a successful setup, you should see the following view in device list:
Clik here to view.

When the device is
unplugged – the device disappears from the device list.
Testing USBasp with avrdude
Arduino software also has an avrdude inside. Unzip the folder and navigate to it through the command-line tool.
Connect USBasp programmer to the board you want to program. You can use an Arduino board with ISP connector:
Clik here to view.

We can read a flash memory of atmega328p by executing the command:
avrdude -p m328p -P usb -c USBasp -U flash:r:flash.hex:r
Clik here to view.

Here is a list of quick commands to test with USBasp and avrdude:
Check device:
avrdude -p m328p -P usb -c USBasp
Read flash contents to .bin file:
avrdude -p m328p -P usb -c USBasp -U flash:r:flash.bin:r
Read flash contents to .hex file:
avrdude -p m328p -P usb -c USBasp -U flash:r:flash.hex:r
Write .bin file to microcontroller flash memory:
avrdude -p m328p -P usb -c USBasp -U flash:w:flash.bin
Write .hex file to microcontroller flash memory:
avrdude -p m328p -P usb -c USBasp -U flash:w:flash.hex
Read eeprom memory to .hex file:
avrdude -p m328p -P usb -c USBasp -U eeprom:r:eeprom.hex:i
Write eeprom .hex file to microocntroller eeprom memory:
avrdude -p m328p -P usb -c USBasp -U eeprom:w:eeprom.hex:i
Fuses write ( Visit fuse calculator to select proper fuse settings. ):
!!!Do not write fuses if you do not know what you are doing!
avrdude -p m328p -P usb -c USBasp -U -U lfuse:w:<0xFF>:m
avrdude -p m328p -P usb -c USBasp -U -U hfuse:w:<0xDA>:m
avrdude -p m328p -P usb -c USBasp -U efuse:w:<0xFD>:m
The post Building and installing USBASP-USB programmer of AVR microcontrollers appeared first on Do It Easy With ScienceProg.