Page 1 of 2

making USBasp hardware with AVR-Doper 2008-04-27 firmware

Posted: Sat May 03, 2008 9:19 am
by renovatio
Hi 2 all.

I made two programmers:

AVR-Doper hardware with "avr-doper-mega8-12mhz.hex" firmware and fuse bytes represented in Makefile.

USBasp hardware with "usbasp-mega8-12mhz.hex" firmware and the same fuses (lfuse 0x9F, hfuse 0xC9).

cause built on ATmega8.

I'm using Win_XP_SP2

AVR-Doper recognised and works,
USBasp is not recognising.

What's wrong ?

P.S. Sorry for my english, I'm russian.

Posted: Sun May 04, 2008 10:13 pm
by christian
You need avrdude and libusb-win32 for USBasp. Have you installed libusb-win32?

Posted: Sun May 04, 2008 11:11 pm
by renovatio
christian wrote:You need avrdude and libusb-win32 for USBasp. Have you installed libusb-win32?


libusb-win32 installed.
I think problem is not there. USBTiny works correctly for example (avrdude).

Must I use original USBasp schematic or make any changes ?
what about fuses ? I wrote fuses represented in Makefile.

Great thanks for your reply, Christian.

Posted: Mon May 05, 2008 1:02 pm
by christian
Sorry, I think I misunderstood your original posting: You're trying to run the AVR-Doper firmware on USBasp hardware and it does not work, right?

In this case you don't need libusb-win32, of course.

I must admit that I have not tested AVR-Doper on USBasp hardware because I don't have one available, only on Metaboard hardware which is very similar. There might be a small error in the configuration or initialization.

Has anybody else tried this on USBasp hardware?

Posted: Mon May 05, 2008 3:55 pm
by renovatio
christian wrote:Sorry, I think I misunderstood your original posting: You're trying to run the AVR-Doper firmware on USBasp hardware and it does not work, right?


Yes, of cause.
Release 2008-04-27

* Fixed bug from previous release: LED pin was not configured as output on AVR-Doper hardware.

Release 2008-04-26

* Assigned a serial number. This should help to assign a consistent COM device regardless of the USB port used.
* Improved ISP speed.
* This version can be compiled for metaboard and USBasp hardware


Here typed, that last release supports USBasp and metaboard. :?:

What you think about that Christian ?

I might make some mistakes at design, because soldered it not on PCB.
When I make both PCB I'll post photos and PCB files in this node.

Christian, can I to make request to you to compile the avr-doper for USBasp firmware ?

with respect, Vladimir

Posted: Mon May 05, 2008 8:45 pm
by christian
You can test your hardware and fuse values with Thomas Fischl's original firmware. If that works, the hardware is OK.

I know that I claimed support for USBasp hardware. This is reasonable since there are only very little changes with respect to metaboard. But it's still possible to make errors, even in tiny changes.

Posted: Mon May 05, 2008 9:17 pm
by renovatio
I live in small town and can not to bye ATmega168.

Will try to modify sources for simply realisation based on ATmega8.

Great thanks and big regards for your replies.

Posted: Mon May 05, 2008 9:20 pm
by christian
The source can be compiled for the Mega8 as well, just change the target device and (optionally) the clock rate in Makefile.

Posted: Thu May 08, 2008 6:53 pm
by renovatio
christian wrote:The source can be compiled for the Mega8 as well, just change the target device and (optionally) the clock rate in Makefile.


Thanks Christian, I'll need to analyze sources and compile for my hardware.

USBASP firmware

Posted: Fri May 16, 2008 8:49 pm
by Dmitry
Not work on usbasp on my board. Strange defines in main on timer 1 configuration. Sorry if I dont right :)

Posted: Tue Nov 18, 2008 1:04 pm
by hot-dog
Hi All. I'm having same problem. I've tried to upload to my usbasp usbasp-mega8-12mhz.hex. When i plug the device into usb I get USB device not recognized (in device manager its "Unknown device"). With usbasp original firmware device works. I wen through the "hardware.h" defines for usbasp. They look OK.

I can help fix this bug, but i don't know where to look.

When I'm using the usbasp-mega8-12mhz.hex the device is working in HID mode?

regards hot-dog

Posted: Wed Nov 19, 2008 10:09 pm
by christian
Sorry, I don't have a real USBasp board for testing, only something very similar. So I can't test all details.

Anybody out there who can comment or who has even found a bug?

Posted: Fri Nov 21, 2008 9:57 am
by ahulap
I have a 2 versions of USBasp: with original schematics and very simplified (without LEDs, jumper, and D+ and D- moved to PD2 and PD3). Original does not work, but modified works! I think that it is something with PB1 and PB0... and found that TIMER1 is initialized for PWM output for METABOARD_HARDWARE.
Mod like this will help:
#if USBASP_HARDWARE
/* do not enable clk output */
#elif METABOARD_HARDWARE
/* timer 1 configuration (used for target clock): */

And one thing more: interface type detection works unstable: readInterfaceType is called before hardwareInit() and pullup on jumper pin is not enabled, so it was very rare to get CDC enabled for me.

Posted: Fri Nov 21, 2008 10:48 am
by Guest
And are HWPIN_ISP_TXD and HWPIN_ISP_RXD set correct to PD0 and PD1? Hardware RXD and TXD is PD0 and DP1. With debug interface enabled hardware UART overrides this pins, and all ok. But when debug is disabled this pins are set in opposite direction?

Posted: Thu Nov 27, 2008 12:10 pm
by christian
Thanks for the info about Timer 1 and the jumper! I have made a new release which fixes these issues. Please let me know how it works!

Regarding RxD and TxD: These pins are swapped because they name the function on the target, not the programmer. RxD must be connected to TxD and vice versa.

Since UART functionality is handled by internal hardware, this does not matter anyway.