Avatar

USBasp ( No drivers needed on Windows ) UPDATE: UART support added !

Mar 21st, 2021 | by: Dimitrios Chr. Ioannidis
Category: Electronics Software
Views 231
Hi,

  while I was working on my version of USBaspUART ( a project that adds UART support to USBasp ... ;) ) I stumbled upon Marius Greuel's @mariusgreuel ( https://github.com/mariusgreuel/USBasp ) repo . He added a Microsoft OS feature descriptor and WinUSB compatibility descriptor . When a USB device with this firmware is plugged in, Windows will automatically load the built-in WinUSB driver.

  I took his code and removed any changes from V-USB's usbdrv file. I came up with a version, which uses a V-USB trunk ( no changes to the driver code ) and could be used as a "template" also for any AVR project which uses V-USB . Just plug your V-USB "powered" device and the Windows will add the default winusb driver. No more zadig, signed drivers or dll hell !

Tested on Windows 10 but it should work from windows XP SP2 and up !

I forked Ralph's excellent improved USBasp firmware and add my changes. You can get it at https://github.com/dioannidis/usbasp. For those that couldn't build the firmware, I uploaded a prebuilded firmware for USBasp with atmega8 named main_winusb.hex .

UPDATE ( 11 June 2021 ) :

  The uart implementation is finshed, using usb control transfers. Because of that ( no CDC ), I wrote a dll and a GUI app ( using Lazarus and Free Pascal), which can be used in windows and linux ( didn’t tried on mac ) to communicate with it but as the code is open source anyone can create his own communication library / app using the tools of his choice.

  Mind you, that, because of the USB 1.1 low speed timing constraints, based on my tests, only the 19200 baud rate, can be used reliably with a steady data stream. The 38400, 57600 and 115200 baud rates, if the data stream are short ( so it can be stored in the 128 bytes internal ring buffer without overflowing it ) or are sended with 20 - 30 ms interval, are working also. Small tip, if one replaces the 12 MHz crystal with a 20MHz one, then a 38400 baud rate can be used reliably also but TPI programming is lost ( working on that ).

  My goal was to use only one inexpensive device, i.e. USBasp, for programming and serial debugging. If anyone is interested, I’ll upload the sources and binaries for both, firmware and dll / app in my github in a week or two.

  I also designed a PCB, which run at 20MHz safely using a step up switching regulator MIC2172 ,  can power the target 5V or 3V3 ( jumper selection ) with max 120 mA. The SPI and UART communication is buffered using a SN74AHC367 pulled up from the target to much the voltage. In the case of USBasp powering the target the SN74AHC367 it's pulled up 5V or 3V3 whichever the output power selection is. I'll upload the schematics, board files ( made in Kicad ) in my github repo also.

Feedback is as always welcome ...

regards,

PHOTO GALLERY



USBaspUART on a breadboard
USBaspUART 20MHz v2

3 Comments

  • ELECTRONOOBS

    about 2 months ago

    Cool design

    Rick Sanchez

    about 2 months ago

    Yes

    Dimitrios Chr. Ioannidis

    about 10 days ago

    Thank you !

Login or Sign Up to post comments on this project.