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

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
renovatio
Posts: 5
Joined: Sat May 03, 2008 9:05 am

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

Post by renovatio » Sat May 03, 2008 9:19 am

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.

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Sun May 04, 2008 10:13 pm

You need avrdude and libusb-win32 for USBasp. Have you installed libusb-win32?

renovatio
Posts: 5
Joined: Sat May 03, 2008 9:05 am

Post by renovatio » Sun May 04, 2008 11:11 pm

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.

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Mon May 05, 2008 1:02 pm

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?

renovatio
Posts: 5
Joined: Sat May 03, 2008 9:05 am

Post by renovatio » Mon May 05, 2008 3:55 pm

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
Last edited by renovatio on Mon May 05, 2008 8:53 pm, edited 1 time in total.

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Mon May 05, 2008 8:45 pm

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.

renovatio
Posts: 5
Joined: Sat May 03, 2008 9:05 am

Post by renovatio » Mon May 05, 2008 9:17 pm

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.

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Mon May 05, 2008 9:20 pm

The source can be compiled for the Mega8 as well, just change the target device and (optionally) the clock rate in Makefile.

renovatio
Posts: 5
Joined: Sat May 03, 2008 9:05 am

Post by renovatio » Thu May 08, 2008 6:53 pm

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.

Dmitry

USBASP firmware

Post by Dmitry » Fri May 16, 2008 8:49 pm

Not work on usbasp on my board. Strange defines in main on timer 1 configuration. Sorry if I dont right :)

hot-dog

Post by hot-dog » Tue Nov 18, 2008 1:04 pm

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

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Wed Nov 19, 2008 10:09 pm

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?

ahulap
Posts: 16
Joined: Tue Dec 26, 2006 1:30 pm
Location: Kharkiv, Ukraine

Post by ahulap » Fri Nov 21, 2008 9:57 am

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.

Guest

Post by Guest » Fri Nov 21, 2008 10:48 am

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?

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Thu Nov 27, 2008 12:10 pm

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.

Post Reply