USBasp Driver Configuration Tutorial
A few days ago ,i was trying to program my atmel avr development board using USBasp programmer and avrdude on my Windows 7 machine.Whenever i try to program the board using USBasp i was getting the error message "could not find USB device "USBasp" with vid=0x16c0 pid =0x5dc".
It was quite frustrating installing the right driver for the USBasp programmer so i decided to write this article on USBasp driver installation.
After purchasing/building the USBasp, connect the device to your PC's/Laptop's USB port and fire up the command prompt (cmd.exe) on your windows machine.
Now on the command prompt type the following commands.Please note that you should have WinAVR installed on your computer for this to work.
|avrdude -p attiny2313 -c usbasp -U flash:w:main.hex|
Please substitute the name of avr microcontroller you are using instead of attiny2313 and name of your hex file instead of main.hex.
Now if you are able to program the chip successfully,the drivers are already installed on your computers and you can stop reading this article and go back to your development process.
On the other hand if you are getting an error message like this
|avrdude: error: could not find USB device "USBasp" with vid=0x16c0 pid=0x5dc|
the libusb drivers are not installed on your computer.
You can also go to Device Manager on your PC to check whether the drivers are installed.If you see a yellow warning icon on the USBasp entry as shown below ,the libusb drivers are missing.
On Linux and Mac OSX no drivers are required ,the drivers for Windows can be easily installed using Zadig USB driver installer.
Go to the zadig site and download the application for your Windows version.
Connect USBasp to your computer and run the Zadig application.Zadig will automatically detect your USBasp device and show the drivers currently installed for it.Here no drivers are currently installed for usbasp ,so Driver column (Left side ) is showing (NONE).
Select USBasp option on the top pull down menu.
Please note that Zadig can detect other USB devices like Mouse,Webcam etc,so make sure that only USBasp is selected before installing the driver..
On the Right Driver column ,select libusb-win32(v126.96.36.199) using the up and down arrows and then press Install Driver button as shown below .
The software will start installing the necessary drivers as shown below.
Press Install when prompted by the software during installation as shown below .
After the installation is complete.The Zadig application will show that libusb driver(libusb0) is installed (Left Driver Column) for your USBasp .
You can also see that now your USBasp device is recognized by windows and can be seen under Atmel USB devices in Windows 7 Device Manager.
Now you can program your ATMEL AVR microcontroller by running the earlier command on the command line.
You are now ready to build your next embedded project using atmel avr chips and USBasp .