Zadig Usbasp

1 view
Skip to first unread message

Kansas Eiffel

unread,
Aug 3, 2024, 10:43:14 AM8/3/24
to suskazywork

Unfortunatley I am having some problems with a USBasp programmer I got recently. I know there are tons of posts out there with issues and fixes for the USBasp, but non of them seem to have the same issue I have. I am on a pc on windows 10. I have installed usb asp drivers, and in device manager there is an entry for "libusb-win32 devices, so that is ok. Also, if I go into command prompt and enter "avrdude -c usbasp -patmega328p" I get the message that everything is ok. The issue comes when I go into the arduino IDE. I select the board I want to program (in this case an Arduino nano just to test), and try to burn bootloader, but the IDE gives this error:

Ok, thanks. I did in the past try using zadig to install the driver and it seemed to work ok. Whenever I do it now however, zadig doesnt seem to detect the usbasp. I have taken a screenshot to show what I mean. Imgur: The magic of the Internet

When I google the topic I see a lot of forums where people have issues getting their USBasp device working under windows 10. But they mostly are having issues with the libusb /WinUSB drivers (Which seems to be fine in my case thanks to the Zadig tool).

For avrdude to correctly work with USBAsp, I found the best to install the libusbK driver, at least under Windows 7. This way it works with both - the official avrdude build, and the one from the Arduino IDE. With the libusb-win32 or the WinUSB it works with one, but fails with another.

The second part is getting AVRDude to recognise the device if using a clone ... it is not enough that the device appears with the correct vendor ID, you need to tell AVRDude to ignore the website URL in the device info. As noted you do this by using -cusbasp-clone from the command line ... but this is not helpful if trying to program devices directly out of Arduino Studio.

(click on the dropdown to see all devices).
You can also plug your USB device after Zadig is running, as the list is refreshed automatically. Its recommended to leave only the device you want to install a driver for, and unplug any other USB device.

I have a usbasp avr-dude-R2 by nsk electronics, it is working well in a windows 7 pc but in my windows 8.1 pc it is showing in device manager as unknown usb device (device descriptor request failed). Tried installing the drivers you mentioned but nothing seems to change. It shows installation failed as my pc didnt detect it as usbasp and shows only as unknown usb device.

Target voltage selection. The USBasp supports target boards running at either 5V or 3.3V. Most Arduino-compatible boards operate at 5V. Place the switch in the appropriate position for the board you will be programming.

"Program" jumper. If you short out this jumper, the USBasp goes into a special mode that changes it from being a programmer to being a target. This is to allow you to update the firmware on the USBasp itself using another programmer.

Target power jumper. With this jumper in place the USBasp will supply power to the target via the ICSP header. This is usually desirable. However, if the target is powered independently (such as through a DC jack or USB connection) you should remove this jumper.

"Slow Clock" jumper. If you short out this jumper, the USBasp will operate at a lower speed to maximise compatibility with some targets. Not generally required unless you're programming brand new AVRs (see below.)

WARNING: Pay special attention to the orientation of the cable. You will see that one side of the cable has a red stripe, to indicate which end is pin 1. The USBasp has a dot next to the ICSP header at the pin 1 end, and your target board should also have a marking next to pin 1. Connect the cable so that the side with the red stripe is closest to pin 1 on both the USBasp and the target. On most targets this will naturally fall into place if you lay the boards down so they are facing you as shown below.

Important note: Unlike many other boards and programmers, USBasp doesn't appear as a USB serial port. Therefore there isn't a port listed under "Tools > Serial Port" in the Arduino IDE, or other places. This is normal.

Normally sketches are installed via the USB port on your Arduino, but you can also install them directly using the USBasp which bypasses the bootloader and USB connection. With your sketch open, use the following menu items.

Linux users may encounter an error like "error sending control message: Operation not permitted" when trying to use the USBAsp. This is because by default normal users don't have access to USB devices.

A temporary workaround is to run the operation as root, using sudo or su. A much better solution is to tell Linux that you want all users to be allowed to access the USBAsp. This is done by creating a udev rule. The specifics of creating udev rules vary a bit depending on which Linux distribution you are using, however there is usually a directory /etc/udev/rules.d which contains files with custom rules. As root, create a new file in that directory called "usbasp.rules" with the following single line of content in it:

The processor used in the FlySight comes with a bootloader installed, but this bootloader incorrectly identifies the device as a "USB 20.0" device instead of a "USB 2.00" device. Windows XP/7 and Mac overlook this small error, but Windows 8/10 will not connect to the FlySight in "firmware update" mode because of it.

On the USBasp, there is a small "jumper" which selects between 5 V and 3.3 V. It's right next to the cable connector. Make sure the jumper goes between the middle pin and the 3.3 V pin. This selects the voltage that will be supplied to the board. Since the FlySight works on 3.3 V, it could be damaged if we applied 5 V to it. The jumper is shown in the following photo, with the orange rectangle in the correct position:

Once you've got WinAVR installed, you can plug the USBasp into your computer. You'll need to install a driver for the USBasp. First, download and install the Zadig USB driver installer, which can be found here:

Select "USBasp" from the list. Check the "Driver" box below. This shows the driver currently installed for your USBasp. If the WinUSB driver is installed, then use Zadig to change it to libusb-win32 by selecting "libusb-win32" from the box to the right, as shown here:

Looking at the FlySight PCB, you will see a large module with a white label that says "NEO-something" on it. Holding the board so that you can read the label, to the left of that module you should see a button labeled S2 and below that a black resistor (small rectangular component) labeled R1. R1 is soldered to the board on the left and right sides, which is where it has a metallic colour. The left side of R1 is what I'm going to call RESET. In the image below, this is indicated by an orange arrow:

You will have to hold the pin against the left side of R1 throughout this process. If the pin comes loose momentarily, you might get an error message. If this happens, try running the "avrdude" command again, but hold the tip of the pin against R1 with a little more pressure until the command is complete.

Now that we know the USBasp can talk to the FlySight, the final thing we want to do is to update the bootloader. You can find links to download two bootloader files below--one for units using the AT90USB646 (bl_usb_64k.a90) and the other for units using the AT90USB1287 (bl_usb_128k.a90).

Download the appropriate bootloader file by right-clicking the link above and choosing "Save link as..." from the menu. Then copy it to a place you can easily access them from the command line. The desktop is pretty easy, so I'll use that. Then go to the command line window again and do the following:

Change to the desktop folder. On my system, I do that with cd Desktop.At the command line, type avrdude -c usbasp -p at90usb646 -U flash:w:bl_usb_64k.a90, but don't press enter. If you're working with the AT90USB1287, you'll want to use avrdude -c usbasp -p at90usb1287 -U flash:w:bl_usb_128k.a90 instead.Hold the tip of the FlySight Programmer's pin to the left side of R1 (RESET) while you press enter on the command line. Hold the tip to RESET until the command is complete.

If you've gotten this far, then the bootloader on your FlySight is updated. The firmware has been erased in the process, but you can now update the firmware on a Windows 8/10 machine using the steps here:

نصب درایور پروگرامر USBASP با نرم افزار zadig خیلی ساده هست و در حالی که پروگرامر به سیستم تون متصل هست نرم افزار zadig رو از انتهای مطلب دانلود و اجرا کنید

اموزش ویدیویی درایور پروگرامر USBASP با نرم افزار zadig و نحوه پروگرام کردن میکرو با usbasp رو در یوتیوب قرار دادیم از اینجا میتونید در کانال ساخت پروژه ویدیو رو ببینید نرم افزار zadig رو میتونید دانلود کنید

The USBASP programmer is used for convenient microcontroller programming. If you are using Windows 10, you will need to use signed drivers so that the programmer works. I have prepared a video for you where the entire installation procedure is explained.

Adapter 10 to 6 pins (10Pin Convert To Standard 6 Pin Adapter Board For ATMEL STK500 AVRISP USBASP) - In all diagrams that connect Arduino-Like microcontrollers are used 6 pin connector. You save as a place. Cost about 1 USD to eBay.

It is good to made one more adapter to be used for programming on the breadboard. It ensures that on the one side is a classic 6-pin connector, which will also be found on your Arduino (marked as ICSP), which is extended to extend on the width of the middle box on the breadboard. You can reach a width of 2x2.51 mm to 4x2.51 mm. Then you are already conveniently connected by individual pins between the USBasp and the microcontroller.

c80f0f1006
Reply all
Reply to author
Forward
0 new messages