Forum Index > General > Ask an Evil Mad Scientist!
 avrdude: initialization failed, rc=-1
 |  Printable Version
By: Anonymous: jbisjim () on Monday, October 25 2010 @ 03:04 PM PDT (Read 22292 times)  
Anonymous: jbisjim

PHP Formatted Code

> "make.exe" program
avrdude -p t2313  -c usbtiny     -P usb -v -e -b 115200  \
         -U lfuse:w:0x64:m -U hfuse:w:0xdf:m -U efuse:w:0xff:m \
                 -U flash:w:larson_jm.hex      

avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

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

         Using Port                    : usb
         Using Programmer              : usbtiny
         Overriding Baud Rate          : 115200
         AVR Part                      : ATtiny2313
         Chip Erase delay              : 9000 us
         PAGEL                         : PD4
         BS2                           : PD6
         RESET disposition             : possible i/o
         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        65     6     4    0 no        128    4      0  4000  4500 0xff 0xff
           flash         65     6    32    0 yes      2048   32     64  4500  4500 0xff 0xff
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          2    0      0     0     0 0x00 0x00

         Programmer Type : USBtiny
         Description     : USBtiny simple USB programmer, http://www.ladyada.net/make/usbtinyisp/
avrdude: programmer operation not supported

avrdude: Using SCK period of 10 usec

avrdude: error: usbtiny_transmit: usb_control_msg: sending control message failed, win error: The I/O operation has been aborted because of either a thread exit or an application request.


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


avrdude: error: usbtiny_transmit: usb_control_msg: sending control message failed, win error: The device does not recognize the command.



avrdude done.  Thank you.

make.exe: *** [program] Error 1

> Process Exit Code: 2
> Time Taken: 00:01
 

any help or comments would be aprecited






       
   
By: Windell (offline) on Monday, October 25 2010 @ 05:09 PM PDT  
Windell

Hi jbisjim,
The "rc=-1" error is a blanket error, meaning that the program was unable to establish communication with the device. There can be any number of reasons for this-- for example unplugged connectors, unpowered target board, missing software components, and so forth. If you have a working system or target board that you can compare to, that will sometimes help.

Double check that the programming cable is connected the right direction (on both ends) and that the target board has power. If you're just trying to program a device for the first time here, double check soldering on the 6-pin connector on the both programmer and target sides, and double check the soldering of the chips on both the programmer and the target.

If the problem persists after checking those things, you may want to redirect this issue to the Adafruit support forums, as the USBtinyISP is made by adafruit, and they may have additional ideas beyond the most common issues, which I listed here.


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   
By: Anonymous: jbisjim () on Monday, October 25 2010 @ 06:41 PM PDT  
Anonymous: jbisjim

First thank you for your resonse, and I realize i really didnt ask a question persay, and i apologize for that. Frustration told me to slap the log up and go from there. I am almost 99% sure that the usbtiny is working correctly. Power light is lit and the data light blinks when i issue programming commands. I get voltage all the way through the unit. And i have double checked my solder points. I am not sure on the 6 pin connector. I have spent a lot of time with my meter. So i know where power is and can decrypt from there. I do have a similar post on the adafruit forums http://forums.adafruit.com/viewtopic.php?f=20&t=17705 where a someone posted the 6 pin configuration, and i currently have my target wired based on that. To be honest i am not sure it is right, on other posts i have seen a complete different pinout. I assume the diagram is from the bottom. Again, love my multimeter. Is my target board working? I made mine based on your simple design, Although i ordered one of your avr target boards today to neaten it up and frankly its labled and that appeals to me greatly. So to answer your questionis it working? Ill state maybe. I can follow voltage into my target board. I am further with the usbtiny programmer that i was with my "ghetto programmer" oh and thanks for putting up my my emails on that too. I know im close, i just dont know how close






       
   
By: Windell (offline) on Monday, October 25 2010 @ 11:06 PM PDT  
Windell

See also, here: http://www.evilmadscientist.com/article.php/avrtargetboards


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   
By: squall_line (offline) on Tuesday, October 26 2010 @ 07:03 AM PDT  
squall_line

Are you trying to power the board with the USBTinyISP?

I humbly recommend trying to power the chip with an external battery pack, with fresh alkaline batteries. I've had all sorts of problems trying to program a 2313 running on NiMH batteries unless they're fresh out of the charger. The circuit usually runs just fine by itself, but as soon as it needs to be programmed, it doesn't have enough power. I've never tried to power a chip/circuit using the USB power on the USBTinyISP.


Forum Mad Scientist
Mad Scientist

Status: offline

Registered: 04/13/10
Posts: 96
Iowa, USA

Profile Email    
   
By: jbisjim (offline) on Tuesday, October 26 2010 @ 07:53 AM PDT  
jbisjim

Yes I am attempting to power the chip via the USBTinyISP.

I humbly ask yet another question: Do I not use the vcc and ground from the USBTinyISP 6 pin cable? Then use A battery pack the 2313's vcc and ground?


Forum Apprentice
Apprentice


Status: offline

Registered: 10/26/10
Posts: 13

Profile Email    
   
By: squall_line (offline) on Tuesday, October 26 2010 @ 08:06 AM PDT  
squall_line

Quote by: jbisjim

Yes I am attempting to power the chip via the USBTinyISP.

I humbly ask yet another question: Do I not use the vcc and ground from the USBTinyISP 6 pin cable? Then use A battery pack the 2313's vcc and ground?



If you want to use a battery pack, you can still keep the 6-pin header hooked to the chip as normal, but be absolutely sure to move/remove the jumper inside the USBTinyISP that provides power to the ribbon cable. There should be some mention of how to do that in the instructions for assembling the USBTinyISP.


Forum Mad Scientist
Mad Scientist

Status: offline

Registered: 04/13/10
Posts: 96
Iowa, USA

Profile Email    
   
By: jbisjim (offline) on Tuesday, October 26 2010 @ 03:37 PM PDT  
jbisjim

Jumper removed, no power out of the usbtinyisp
Added battery pack (3v) to the chip, dble checked with meter. in fact i put my meter to several contacts to check continuity.

I am still getting: initialization failed, rc=-1

update:

I noticed when i put the battery pack on and sent commands the data light did not light. Turn battery pack off data light works when commands are sent.


Forum Apprentice
Apprentice

Status: offline

Registered: 10/26/10
Posts: 13

Profile Email    
   
By: Windell (offline) on Tuesday, October 26 2010 @ 07:12 PM PDT  
Windell

You can only power your target with one power source at a time, so just be careful of that.

The rc=-1 error can be caused by a large number of things, including software issues.

You may also want to see this post about similar issues:
avrdude: error: usbtiny_transmit: usb_control_msg:

BTW: Is your usbtiny from Adafruit (green circuit board?)


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   
By: jbisjim (offline) on Wednesday, October 27 2010 @ 04:33 AM PDT  
jbisjim

BTW: Is your usbtiny from Adafruit (green circuit board?)

yes

I also ordered one of your Avr target boards, thinking it may clean a few things up

You can only power your target with one power source at a time, so just be careful of that.

I had the jumper pulled and according to my meter there was no power coming from the usbtiny

You may also want to see this post about similar issues:
avrdude: error: usbtiny_transmit: usb_control_msg

hmm i will check it out


Forum Apprentice
Apprentice

Status: offline

Registered: 10/26/10
Posts: 13

Profile Email    
   
By: jbisjim (offline) on Wednesday, October 27 2010 @ 09:04 AM PDT  
jbisjim

avrdude: error: usbtiny_transmit: usb_control_msg



Brought up a whole slew of new questions.

It could be related how my USB port is talking to the usbtinyisp?? And to try plugging it in just before I send commands. I will try this tonight and see what happens

libusb is causing it to disconnect? can that be fixed

if you want to fix it yourself, simply replace the lines in usbtiny.c in avrdude that have
sizeof(res)
with
4

can not seem to find that one, I assume its for linux ..

I see that i am not alone in my quest to program these chips.


A. I am glad on some level i am having these issues, teaches me a lot of things
B. Not so glad because i want to hook my to Larson kits together and make a super cylon pumkin for Holloween, but cant see to get a chips to program


Forum Apprentice
Apprentice


Status: offline

Registered: 10/26/10
Posts: 13

Profile Email    
   
By: squall_line (offline) on Wednesday, October 27 2010 @ 09:30 AM PDT  
squall_line

Quote by: jbisjim

avrdude: error: usbtiny_transmit: usb_control_msg



Brought up a whole slew of new questions.

It could be related how my USB port is talking to the usbtinyisp?? And to try plugging it in just before I send commands. I will try this tonight and see what happens

libusb is causing it to disconnect? can that be fixed

if you want to fix it yourself, simply replace the lines in usbtiny.c in avrdude that have
sizeof(res)
with
4

can not seem to find that one, I assume its for linux ..

I see that i am not alone in my quest to program these chips.


A. I am glad on some level i am having these issues, teaches me a lot of things
B. Not so glad because i want to hook my to Larson kits together and make a super cylon pumkin for Holloween, but cant see to get a chips to program



Ahh...

If you have a Larson Scanner Kit already, and have it working, I would recommend adding the programming header to one of the boards. Then try programming the chip while the scanner is up and running. At least that way you know that the hardware side of the equation is all sorted, because the wiring for the header is already in place (but DON'T try to run the Larson Scanner off of the USB power!)

The only reason I recommended the power supply as a possible cause is because my first experience with programming an ATTiny2313 was on a Larson Scanner, so I knew that the board was already wired correctly. My batteries were too low to allow the programming to take place, as I mentioned earlier.

What hardware/OS are you using to program? Mac, Windows, Linux?

Also, as a heads-up, I didn't address it before, but I've never had my red LED flash on the USBTinyISP while programming using an external power supply, so that's not necessarily an indication of anything wrong.

When programming a Larson Scanner, the Scanner should go blank while programming is taking place.


Forum Mad Scientist
Mad Scientist

Status: offline

Registered: 04/13/10
Posts: 96
Iowa, USA

Profile Email    
   
By: jbisjim (offline) on Wednesday, October 27 2010 @ 11:28 AM PDT  
jbisjim

If you have a Larson Scanner Kit already, and have it working,

Frak yeah, got my pumpkin sitting in the kitchen ready to be made into a Cylon I was excited to see the post on the linking of the 2 and 3 scanners together. Run that during episodes of Caprica. [insert nerd comment here]

I would recommend adding the programming header to one of the boards.

This brings me another glimmer of hopeBig Grin As soon as my order from emsl comes I will do just that. In fact I installed a 20 socket header on my "other" Larson scanner so i can move chips around but now may be able to use it as a target board.

What hardware/OS are you using to program? Mac, Windows, Linux?


Windows7 64bit


Forum Apprentice
Apprentice


Status: offline

Registered: 10/26/10
Posts: 13

Profile Email    
   
By: jbisjim (offline) on Friday, October 29 2010 @ 04:40 PM PDT  
jbisjim

Update:

I built my 2nd larson Scanner tested it with the preprogrammed chip. All the LEDs lit up and worked wonderfully. I then soldered a 6 pin header connector to the board, took out the preprogrammed chip and inserted a new blank one. I turned on the larson scanner and attempted to program it.

Same results

I then took a 2nd blank 2313 and attempted to program it

Same results

I then took my new shiny 2313 target board from EMSL ( really cool board btw) put a 20 pin zif socket and a 6 pin header on it and attached 3v power pack (with new batteries)

Same results

Thoughts?


Forum Apprentice
Apprentice

Status: offline

Registered: 10/26/10
Posts: 13

Profile Email    
   
By: Windell (offline) on Friday, October 29 2010 @ 08:40 PM PDT  
Windell

As before, the problem can be in several different places:

- The larson scanner (unlikely at this point, having tried multiple targets)
- In the USBtinyISP
- In the software/on your computer.

Have you gotten this USBtiny to work, ever? If not, there may still be a soldering issue on that device. And, there may be software issues. Try installing the software on a different computer, if you have access. Or, if you have access to an Arduino board or Arduino clone, you could try using the Usbtiny directly from within that, to test it with a separate software install.


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   



 All times are PDT. The time is now 11:51 PM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to Post 
Filtered HTML Allowed 
Censored Content 

Evil Mad Scientist Forum Archives — Read only!

Please visit our new forums for new discussions.


DIY Hardware for Electronic Art


The Original Egg-Bot Kit


Octolively
Interactive LED kits


Meggy Jr RGB
LED matrix game
development kit.


Business-card sized
AVR target boards


Peggy 2
LED Pegboard kits

My Account






Lost your password?