avrdude: initialization failed, rc=-1

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
Guest

avrdude: initialization failed, rc=-1

Post by Guest » Sun Apr 08, 2007 10:43 am

Hi, I'am asking for help with this project http://www.rototron.info/?Page=USBAVR/USBAVR.ASPX. I can't make it to work. I've done everything excatly as the scheme with one exception I replace this part 74HC126 by this 74LS126 (problem with buy). I'am trying to program Atmega with any kind of hex, and i've got always the same error:


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

Maybe this wil help:

Code: Select all


C:\WinAVR\bin>avrdude -c stk500v2 -p m8 -P avrdoper -v -u -U flash:w:test.hex

avrdude: Version 5.3.1, compiled on Feb  8 2007 at 14:26:28
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         System wide configuration file is "C:\WinAVR\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  Max
W   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ---
-- ---------
           eeprom         4    10   128    0 no        512    0      0  9000  90
00 0xff 0xff
           flash         33     6    64    0 yes      8192   64    128  4500  45
00 0xff 0x00
           lfuse          0     0     0    0 no          1    0      0  2000  20
00 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  2000  20
00 0x00 0x00
           lock           0     0     0    0 no          1    0      0  2000  20
00 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.8 V
         Varef           : 0.0 V
         Oscillator      : 1.229 MHz
         SCK period      : 2.2 us

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.


Atmega is connected to programmer in this way:
MOSI > 17
MISO > 18
SCK > 19
RESET > 1
GROUND > 8

and the 4.5V power from battery.

Is it possible that problem is in that part replacement ?

tych0

Inverter

Post by tych0 » Tue Apr 10, 2007 5:19 am

Yes. The problem is with the inverters. Don't ask me why (it might be because of a slightly higher swing voltage required) but any other 74* series chip will not work. I ran through the same problem, until I found a lcoal supplier which had _five_ units left. Needless to say, I grabbed them all up ;)

Best of luck finding a supplier!

Take care

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

Post by christian » Fri Apr 13, 2007 8:02 pm

Yes, you need a CMOS buffer chip. The HCT126 is preferred.

The buffer allows for differences in supply voltage between programmer and target. If you don't need this feature, a version without buffer chip is (in principle) possible.

Any volunteers who design a version and firmware patch to work without the buffer? The firmware patch should be quite simple, see the file isp.c for details.

Post Reply