avrdude: initialization failed, rc=-1

USB AVR Programmer and SPI interface. Adafruit's USBtinyISP.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
sahirmathur
 
Posts: 3
Joined: Sun Jan 09, 2011 8:41 am

avrdude: initialization failed, rc=-1

Post by sahirmathur »

I have recently purchased this device
http://www.adafruit.com/index.php?main_ ... ucts_id=46

I am using this to program this
with http://www.adafruit.com/index.php?main_ ... ucts_id=54

I am using windows 7 x64 with the driver for x64 available on the downloads page

This is what i get with avrdude

Code: Select all

C:\Users\Sahir Mathur>avrdude -c usbtiny -p t2313

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


avrdude done.  Thank you.

What should i do?
Attachments
Complete system
Complete system
28012011607.jpg (615.24 KiB) Viewed 5721 times
Solder, back
Solder, back
28012011605.jpg (662.59 KiB) Viewed 5721 times
Top Picture without cables
Top Picture without cables
28012011604.jpg (670.61 KiB) Viewed 5721 times

User avatar
jtwink
 
Posts: 2
Joined: Sun Jan 30, 2011 5:02 pm

Re: avrdude: initialization failed, rc=-1

Post by jtwink »

I think I am having a similar problem as sahirmathur. I also recently ordered from Adafruit both a USBTinyISP and an Attiny2313 (same links).

As per the "How to get help!" post, here are my details:

1) I am using a USBTinyISP from a kit
2) I am using Windows 7 professional 64-bit
3) I am using AVRDude and the Attiny2313
4) I have never used the USBTinyISP for programming anything except this chip
5-6) Screenshots below:

I wanted to do this using a breadboard. To make connections to the ISP header (?) easier, I soldered some right angle male headers to some straight ones. I checked the connector and all six connect through the breadboard fine and do not cross each other. Then I wired the various pins accordingly (used an example off the web - http://www.evilmadscientist.com/article ... rgetboards):
Breadboarded Attiny2313
Breadboarded Attiny2313
BreadBoard_prog_disconnected.jpg (235.72 KiB) Viewed 5699 times
The board itself went together without issue & looks right. Here's both sides of the board:
USBTinyISP Both Sides
USBTinyISP Both Sides
USBTinyISP_Both.jpg (632.79 KiB) Viewed 5699 times
I installed the drivers, WinAVR, AvrDude, etc. as per various instructions. I'm fairly sure I got the VCC and ground connected correctly because I set the jumper on the USBTinyISP and then put an LED on the breadboard & it lights up. Knowing where the power and ground were helped understand where the rest of the connectors were. I made sure I put SCK to SCK, MOSI to MOSI, etc. I also don't think I need a crystal to at least check if I can talk to the chip, right?

It also seems that the USBTinyISP is working. Running AVRDude with "avrdude -c usbtiny -p t2313" gives me initialization failed, which seems to indicate the computer is talking to the USBTinyISP, but still not the chip. From other documentation (http://www.ladyada.net/make/usbtinyisp/help.html) this seems to indicate either I've got it hooked up wrong or the chip is bad. I tried the same command with verbose (-vvvv) and got this:
AvrDude verbose
AvrDude verbose
Avrdude_Test2_verbose.jpg (408.95 KiB) Viewed 5699 times
I _am_ new to this sort of development (used to Arduino so far), so I admit I'm probably missing something. In digging through various tutorials and FAQ's, though, I am at a bit of a loss to discover exactly what.

Any help would be appreciated. Thanks!

Jim Wink

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: avrdude: initialization failed, rc=-1

Post by adafruit »

it is almost definitely not a 'programmer' problem but a chip/wiring/clock/etc problem

http://www.ladyada.net/make/usbtinyisp/help.html

User avatar
sahirmathur
 
Posts: 3
Joined: Sun Jan 09, 2011 8:41 am

Re: avrdude: initialization failed, rc=-1

Post by sahirmathur »

@jtwink
Is that a capacitor i see on your breadboard?

@adafruit
does this chip need a clock?

User avatar
jtwink
 
Posts: 2
Joined: Sun Jan 30, 2011 5:02 pm

Re: avrdude: initialization failed, rc=-1

Post by jtwink »

No capacitor - it's all connected directly to the USBTinyISP. You may need a couple of capacitors and crystal for clock, but to check whether the chip can talk to the USBTinyISP, I think you can do without anything extra. At least it seems so based on what I've seen in other examples:

http://blog.hackerspace.my/programming- ... usbtinyisp

Granted this is an earlier iteration of the USBTinyISP, but I think the following command should work:

avrdude -c usbtiny -p t2313 -P usb -C C:\WinAVR-20100110\bin\avrdude.conf

User avatar
sahirmathur
 
Posts: 3
Joined: Sun Jan 09, 2011 8:41 am

Re: avrdude: initialization failed, rc=-1

Post by sahirmathur »

Do i need an external clock? because in the datasheet of the Attiny2313 it mentions an internal oscillator
If i need one, what speed clock would you recommend?

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: avrdude: initialization failed, rc=-1

Post by adafruit »

a brand new attiny2313 has an internal oscillator, a programmed one may not have it selected

User avatar
cfaulkingham
 
Posts: 15
Joined: Tue Feb 15, 2011 5:17 pm

Re: avrdude: initialization failed, rc=-1

Post by cfaulkingham »

@jtwink Isn't that smaller capacitor TOP LEFT supposed to be on C1 instead of BUS. See http://www.ladyada.net/images/usbtinyis ... nyhack.jpg

BTW, I am having the same issue and I can't figure out what's wrong either. I have tried using a simple target board from EMS and I also tried bread boarding it; neither worked. I am trying to program a Tiny2313. I tested to make sure the Tiny2313 was getting power and it was. Also my green light comes on when connected to USB and the red light flickers when I send it a command via AVRDude.

I have ordered and Oscilloscope so that I can try to debug it. I wish I had a know working target board so I could determine where the problem is.

User avatar
dr hobby
 
Posts: 1
Joined: Wed Feb 16, 2011 2:50 pm

Re: avrdude: initialization failed, rc=-1

Post by dr hobby »

I am having same problem also. Green light comes "ON", red light flickers indicating sending data, then error msg flies up. I have rechecked wiring several times all appears ok, I can measure VCC & Gnd with DVOM, still error messages. Can I send mine in and have someone test it?

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: avrdude: initialization failed, rc=-1

Post by adafruit_support_bill »

@Dr Hobby - post some photos of the front & back of your board and we will look for any assembly issues.

User avatar
cfaulkingham
 
Posts: 15
Joined: Tue Feb 15, 2011 5:17 pm

Re: avrdude: initialization failed, rc=-1

Post by cfaulkingham »

@arduwino like I said in my previous post the green led comes on and the red led comes on when I send it cmd via avrdude. Also, I put a multimeter on the Tiny2313 on the EMS target board and it was receiving power.

1) Adafruit USBTinyISP
2) MacBook running OSX 10.6: What OS and computer are you using?
3) Crosspack Toolchain trying to program a Tiny2313
4) It never worked.

$ avrdude -c usbtiny -p t2313
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

Front of USBTiny
http://dl.dropbox.com/u/23267/USBTinyISP_front.jpg
http://dl.dropbox.com/u/23267/USBTinyISP_back.jpg

EMS Target Board,
http://dl.dropbox.com/u/23267/ems_avrt_front.jpg
http://dl.dropbox.com/u/23267/ems_avrt_back.jpg

Any help would be appreciated.

User avatar
abqlewis
 
Posts: 71
Joined: Fri Dec 11, 2009 2:19 am

Re: avrdude: initialization failed, rc=-1

Post by abqlewis »

I don't know this was already talked about in the replies, but...
If you are using the ATTiny2313 meant for the USBTinyISP, it is probably already fused for an external oscillator, like in the USBTinyISP. You just installed an oscillator (XTAL) when you built yours. Without a fuse change or an external crystal, I don't think it will program. Try to get a brand-new, UN-programmed AVR to test your USBTinyISP. Or, get a copy of the crystal and caps in the USBTinyISP. Ironically. once you get it to program, you should be able to change the fuse to use the internal clock.

Adafruit - Are your USBTinyISP ATTiny2313's programmed and then fused for external crystal?
Last edited by abqlewis on Wed Feb 16, 2011 8:30 pm, edited 1 time in total.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: avrdude: initialization failed, rc=-1

Post by adafruit_support_bill »

Yes, the USBTinyISP chips are programmed for an external crystal.

Locked
Please be positive and constructive with your questions and comments.

Return to “USBtinyISP”