Page 1 of 1

AVR-Doper [Rototron] programming problem

Posted: Sat Jun 02, 2007 11:58 am
by idiotdea
I have build the modified AVR-Doper programmer described on http://www.rototron.info/?Page=USBAVR/USBAVR.ASPX , and am now having problems with programming.

I am trying to program an ATmega8, similar to the one in the programmer, and get the the following output:

Code: Select all

# avrdude -c stk500v2 -P avrdoper -p atmega8 -e -U flash:w:main.hex:i

avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.


Here is also the output from 'dmesg' after plugging in the programmer:

Code: Select all

usb 2-2: new low speed USB device using uhci_hcd and address 9
usb 2-2: configuration #1 chosen from 1 choice
drivers/usb/input/hid-core.c: ctrl urb status -75 received
hiddev0: USB HID v1.01 Device [obdev.at AVR-Doper] on usb-0000:00:1d.1-2

Seems alright? Or does the status -75 indicate a problem?

I have also checked some voltage levels, and they appear (to me) ok. The led on the programmer also flashes when issuing the programming command.

Does the error message when trying to program indicate a problem with the programmer itself, or with the connection of the chip to be programmed?

I would be very grateful for any help on how to proceed tracking down this problem!

Posted: Thu Jun 07, 2007 2:27 pm
by christian
I don't know what error -75 means, but since you say that the programmer LED flashes, it can't be something fundamental.

Avrdude's error message indicates that there was (probably) a timeout in the communication with the target device. I would recommend that you check the ISP levels, levels on the HC126 (an LS126 won't work) and the supply voltage of the target.

Posted: Sun Jun 24, 2007 12:40 am
by cordless89
I have the Robotron working fine with XP. I'll try and assist if you need anything. Just let me know.

help

Posted: Sun Apr 27, 2008 1:50 am
by megaboy
hi there ,i have the same problem here
i build the same layout that is in the avrdoper folder ,i't connects to usb succesfully and when i select the programmer in avr studio (in cdc mode)
it's open but can't enter programming mode,also the led is blinking
i tried it on avrdude (in HID mode) the led is blinking but it 's failed either
here is what i get in avrdude:

(bin) 26 % avrdude -c stk500v2 -P avrdoper -p atmega8 -U flash:w:test2.hex:i

avrdude.EXE: stk500v2_command(): command failed
avrdude.EXE: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.


avrdude.EXE done. Thank you.

i checked the voltage levels on the 74hc126 and the vcc was 4.8v if i use the usb supply and it's 5.1 when it's from external supply,i also checked the treset by connecting it to led's kathode and it's blinking the same as the programmer led.
so would u please help if u have any idea ,i build three copy's of the circuit's and tried many firmwares but it's same. :cry:

Posted: Sun Apr 27, 2008 10:49 am
by christian
Please try to add a couple of -v options to the command line of avrdude. It should print more information about data sent and received.

Have you verified that the AVR you are programming is clocked with at least 1 MHz?

thank u very much

Posted: Sun Apr 27, 2008 12:18 pm
by megaboy
thank u very much, the problem was that i vorget to put an external crystal, now it's 100% working in both CDC & HID modes
in CDC it's take 35 sec to read flash memory on atmega8 ,is that normal?
in HID mode it's fast.
here what i get in HID mode on avr doper after working:

avrdude -c stk500v2 -P avrdoper -p atmega8 -U flash:w:test2.hex:i -v -v

avrdude.EXE: Version 5.4, compiled on Jun 24 2007 at 16:55:32
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

System wide configuration file is "C:\WinAVR-20070525\bin\avrdude.conf"

Using Port : avrdoper
Using Programmer : stk500v2
AVR Part : ATMEGA8
Chip Erase delay : 10000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 4 20 128 0 no 512 0 0 9000 9000 0xff 0xff
flash 33 10 64 0 yes 8192 64 128 4500 4500 0xff 0x00
lfuse 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
lock 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00
calibration 0 0 0 0 no 4 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : STK500V2
Description : Atmel STK500 Version 2.x firmware
Programmer Model: STK500
Hardware Version: 1
Firmware Version: 2.04
Topcard : STK501
Vtarget : 4.7 V
Varef : 0.0 V
Oscillator : 1.229 MHz
SCK period : 2.2 us

avrdude.EXE: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.05s

avrdude.EXE: Device signature = 0x1e9307
avrdude.EXE: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude.EXE: erasing chip
avrdude.EXE: reading input file "test2.hex"
avrdude.EXE: writing flash (460 bytes):

Writing | ################################################## | 100% 0.63s

avrdude.EXE: 460 bytes of flash written
avrdude.EXE: verifying flash memory against test2.hex:
avrdude.EXE: load data flash data from input file test2.hex:
avrdude.EXE: input file test2.hex contains 460 bytes
avrdude.EXE: reading on-chip flash data:

Reading | ################################################## | 100% 0.45s

avrdude.EXE: verifying ...
avrdude.EXE: 460 bytes of flash verified

avrdude.EXE done. Thank you. :wink:

now i'm redisigning it in extra small size (all smd) and without hvsp ,can i put it on this site?
thanks alot.

Posted: Sun Apr 27, 2008 12:35 pm
by christian
CDC mode speed can be limited due to aggressive polling by the host. The new version posted yesterday may bring an improvement here. Also, if you have a CPU clock of more than 1 MHz, you can try to pass -B1.1 to avrdude for a higher ISP clock. The -B option is stored in AVR-Doper until you override it or until the next reset.

When you build your own hardware, please have a look at http://www.obdev.at/goto.php?t=metaboard-prog

This hardware can run USBasp and the latest version of the AVR-Doper firmware with ISP only.

smal problem

Posted: Sun Apr 27, 2008 3:38 pm
by megaboy
when i'd download the new firmware the program led is lighting very low
i think that because that is blinking in high frequency, i'll try to reduce it's R5 resistor.
about the new firmware, does it works on windows vista with both modes?
because i tried the earlier version and avr studio could not locate the port and avrdoper didn't work with libusb32.

Posted: Sun Apr 27, 2008 4:36 pm
by christian
Sorry about the LED, this is a bug with an #ifdef: The pin is configured as input and if on, the pull-up is enabled, providing a bit of current to the LED.

You can fix the problem by adding

Code: Select all

    UTIL_PBIT_SET(ddr, HWPIN_LED);

in line 573 of file main.c (directly above UTIL_PBIT_CLR(port, HWPIN_LED); ).

I'll release a fix ASAP.

The CDC driver problem on Vista is not solved yet, as far as I know. Vista recognizes the device and it is listed, but it does not work. Any input on this topic is very welcome!

SOLVED..

Posted: Tue Apr 29, 2008 5:39 am
by megaboy
thanks very much for helping me.
i recompiled it and it's working 100%.
another little question,can i use usbasp programmer as stk500? like avrdoper or it's only working on avrdude?

Posted: Tue Apr 29, 2008 10:42 am
by christian
USBasp is not compatible to any version of the STK500. It can therefore only be used with avrdude.

However, the USBasp hardware can run the latest version of the AVR-Doper firmware. With this firmware, it has most features of AVR-Doper and is thus compatible to the STK500v2.

sorry for late

Posted: Sun Aug 17, 2008 9:10 pm
by megaboy
hello christian , i have two good news
1st the CDC driver for windows Vista is ready by Osamu Tamora and it's working 100% , i'd tested it on TOSHIBA Sattellite.
2nd i'd finished my new design on AVR Doper and i reduced it to half original size (skipped all HVSP component ) and i called it AVR minidoper . i'll try to put it in my homepage asap and i'll send u the premilary pics to tell me ur opinion and suggestions.