USBasp ( No drivers needed on Windows ) UPDATE: Slow HID UART support
Mar 21st, 2021 | by: Dimitrios Chr. IoannidisCategory: Electronics Software
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 .
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 ).
UPDATE ( 16 Feb 2022 ) :
The usb control transfers approach seems to be unreliable for my use case. I implemented a HID UART which is slow ( 4800 Baud ) but reliable. Now the USBasp appears as a composite device with a WINUSB interface and a HID interface.
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.
UPDATE
Forgot to post the hardware github repo, apologies ! Here it is https://github.com/dioannidis/usbaispuart
Feedback is as always welcome ...
regards,
PHOTO GALLERY
→
←
USBaspUART on a breadboard
ELECTRONOOBS
about 3 years agoCool design
Rick Sanchez
about 3 years agoYes
Dimitrios Chr. Ioannidis
about 3 years agoThank you !
Noob 19129
about 5 months agoPlease try Google before asking about Top Rated Product Site 57983_5
Noob 19129
about 1 month agoPlease try Google before asking about Cool Product Website c5f79e0
Noob 19129
about 14 days agoPlease try Google before asking about Great Product Tips 4aa023d