USBtinyISP Programmer Problems

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
marke3
 
Posts: 205
Joined: Sat Feb 08, 2014 5:24 pm

USBtinyISP Programmer Problems

Post by marke3 »

My environment is Win 10 on 64bit Core i5 and I have flashed Trinkets via Arduino IDE and AVRs via Avrdude quite happily. I use:
adafruit-arduino-1.6.4-windows\arduino-1.6.4\hardware\tools\avr/bin/avrdude (avrdude: Version 6.0.1)
and:
avrdude version 6.1-svn-20131205, URL: <http://savannah.nongnu.org/projects/avrdude/

Coming back to Trinket over the last week or so something unusual was happening during upload. There are a lot of (70 odd) 'n retries during SPI command' messages on the console during the write. But it flashes successfully so I wasn't too perturbed.

However, the last couple of days I've been unable to flash an AVR as Avrdude is seeing (or not seeing) the USBtinyISP programmer per the following.
C:\Users\Mark\Documents\AVR-Programming-master\Chapter12_Analog-to-Digital-Conversion-II\voltmeter>make flash
avrdude -c usbtiny -p atmega168 -U flash:w:voltmeter.hex

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


avrdude done. Thank you.

make: *** [flash] Error 1

C:\Users\Mark\Documents\AVR-Programming-master\Chapter12_Analog-to-Digital-Conversion-II\voltmeter>
Also what seems to have changed is that the devices now show up as USBtiny under Atmel USB Devices in Device Manager.

I've used 3 different USB cables and different Trinkets 3V/5V and get the same outcome.

I've also used 3 different USB cables on the USBtinyISP; via 2.0 hub and 2.0 on laptop; and tried other makefiles that have always worked.

I have retried reinstalling the latest drivers and while the Win 10 exercise never gives me 100% confidence, the right drivers seem to be in the right directories.

I have also searched the forums for anything similar but only been able to find the drivers advice. Any ideas what else I might try?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: USBtinyISP Programmer Problems

Post by adafruit_support_rick »

avrdude -c usbtiny -p atmega168 -U flash:w:voltmeter.hex
why are you using an atmega168 processor type for a Trinket?

The rc=-1 error means that the USBtinyISP is not communicating with the target. Do you have anything connected to pins 3 or 4 on the Trinket?

User avatar
marke3
 
Posts: 205
Joined: Sat Feb 08, 2014 5:24 pm

Re: USBtinyISP Programmer Problems

Post by marke3 »

That is the error when I use the USBtinyISP programmer to (try to) flash a bare 168 AVR. So the three symptoms I'm getting that seem to point towards driver issues are:

In device manager the trinket and the programmer show as USBtiny under Atmel USB Devices.
Flashing a trinket with ID and bootloader works but only after multiple SPI messages during write.
Using the programmer to flash a bare AVR is not working as Avrdude is not seeing the programmer.

User avatar
marke3
 
Posts: 205
Joined: Sat Feb 08, 2014 5:24 pm

Re: USBtinyISP Programmer Problems

Post by marke3 »

Aha. You mentioned the rc=-1 is problem between programmer and target so I rewired the breadboard and it worked properly. (That probably should have been one of my first debug actions... oops)

I'll just ignore the other non-terminal symptoms :)

Thanks very much, Rick.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: USBtinyISP Programmer Problems

Post by adafruit_support_rick »

OK - good find!

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

Return to “USBtinyISP”