SOLUTION: Macs with USB 3 and USBtinyISP

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

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
bitteroz
 
Posts: 2
Joined: Tue Jul 17, 2012 7:12 am

SOLUTION: Macs with USB 3 and USBtinyISP

Post by bitteroz »

On my MacBook Air (mid 2012) which features USB 3 ports I have had some significant issues with the USBtinyISP and avrdude. I received consistent error messages as below:

Code: Select all

$ avrdude -c usbtiny -p t85 

avrdude: error: usbtiny_transmit: usb_control_msg(DeviceRequestTO): unknown error
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.
The solution to this was to place a USB 2 hub between my Mac and the USBtinyISP - everything started working again.

I hope this helps someone.

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

Re: SOLUTION: Macs with USB 3 and USBtinyISP

Post by adafruit_support_rick »

Thanks for the tip! I would not have expected that. I wonder how many other USB gizmos are going to have problems?

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

Re: SOLUTION: Macs with USB 3 and USBtinyISP

Post by adafruit_support_rick »

Here's an interesting article on the subject of newer USB hardware and cables. I'd be interested in knowing if your USBtiny works directly with the Air using a different cable?

bitteroz
 
Posts: 2
Joined: Tue Jul 17, 2012 7:12 am

Re: SOLUTION: Macs with USB 3 and USBtinyISP

Post by bitteroz »

I have tried two cables with exactly the same results. The hub fixes it every time.

User avatar
richms
 
Posts: 558
Joined: Tue Jan 20, 2009 3:05 am

Re: SOLUTION: Macs with USB 3 and USBtinyISP

Post by richms »

I have had huge issues with other USB2 and 1 items on the front USB 3 ports on my computer that connect to the large connector on the motherboard. Finally relented and got a USB2 combo card reader and port thing to put in that connects to a smaller USB2 motherboard header. Same things work fine.

Not sure if its because the mobo's USB3 isnt native to the chipset or because USB3 is problematic, but in any case I didnt think to try a hub at the time.

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

Re: SOLUTION: Macs with USB 3 and USBtinyISP

Post by adafruit_support_rick »

For future reference, what sort of computer, OS, and USB2 gizmo are you using? Also, what sort of USB devices have you had trouble connecting? Any arduino or adafruit stuff?

User avatar
richms
 
Posts: 558
Joined: Tue Jan 20, 2009 3:05 am

Re: SOLUTION: Macs with USB 3 and USBtinyISP

Post by richms »

In my case it was a couple of cheap usb2 to sata docks without a card reader (the red ones) and some dirt cheap nokia data cables with prolific fakes in them. I tried an unpowered hub and the sata docks worked. Not too fussed about the data cables

User avatar
jestervineo
 
Posts: 6
Joined: Mon Sep 17, 2012 7:36 pm

Re: SOLUTION: Macs with USB 3 and USBtinyISP

Post by jestervineo »

I am having this same problem, but haven't been able to resolve it.

I have a new (two month old) Macbook Pro.

I have a new USBtinyISP.

I have tried programming an AVR I wired up on a breadboard as well as an Arduino Nano v3. Neither can be programmed.

I have tried four different USB cables as well as a (very old) USB hub. All had the same results.

Here is the verbose output from avrdude:

Code: Select all

Steves-MacBook-Pro:avr steve$ avrdude -v -v -v -v -patmega328p -cusbtiny -P usb -Uflash:w:firefly.hex:i

avrdude: Version 5.11.1, compiled on Feb 16 2012 at 22:11:20
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/usr/local/CrossPack-AVR-20120217/etc/avrdude.conf"
         User configuration file is "/Users/steve/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : usbtiny
avrdude: usbdev_open(): Found USBtinyISP, bus:device: 003:004-1781-0c9f-ff-00
         AVR Part                      : ATMEGA328P
         Chip Erase delay              : 9000 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        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           signature      0     0     0    0 no          3    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(DeviceRequestTO): unknown error
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

Steves-MacBook-Pro:avr steve$ 
Anybody have any suggestions? Am I doing something wrong? It seems like others have gotten it to work with different cables or a hub, but that hasn't been my experience. Is there something specific I should be looking for in a cable or hub?

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

Re: SOLUTION: Macs with USB 3 and USBtinyISP

Post by adafruit_support_rick »

Post some pictures of both sides of the USBTiny circuit board. We'll have a look..

User avatar
jestervineo
 
Posts: 6
Joined: Mon Sep 17, 2012 7:36 pm

Re: SOLUTION: Macs with USB 3 and USBtinyISP

Post by jestervineo »

Here are my pictures...
Top Side
Top Side
IMG_1026.JPG (449.68 KiB) Viewed 9118 times
Bottom Side
Bottom Side
IMG_1027.JPG (436.73 KiB) Viewed 9118 times
Thanks for looking.

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

Re: SOLUTION: Macs with USB 3 and USBtinyISP

Post by adafruit_support_bill »

The build looks good. Make sure you are not using a USB-3.0 port.

User avatar
jestervineo
 
Posts: 6
Joined: Mon Sep 17, 2012 7:36 pm

Re: SOLUTION: Macs with USB 3 and USBtinyISP

Post by jestervineo »

I am using a USB 3 port, but that's all I've got on this computer. I tried several different cables and a very old USB hub -- no luck.

Are you saying it won't work at all with a USB 3 port? Or is there a special type of cable or hub that I need to use?

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

Re: SOLUTION: Macs with USB 3 and USBtinyISP

Post by adafruit_support_bill »

We have seen problems using Arduinos and USBTinyISPs on some USB 3 ports.

Connecting via a USB2.0 or older hub usually takes care of it. If that still doesn't work, the problem is likely elsewhere.

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

Re: SOLUTION: Macs with USB 3 and USBtinyISP

Post by adafruit_support_rick »

Well, it's a long-shot, but I have seen some odd things with Mac and the USBTiny. Disconnect the tiny and reboot the Mac. Then, attach the tiny through your old hub - don't attach the tiny directly the computer.

User avatar
jestervineo
 
Posts: 6
Joined: Mon Sep 17, 2012 7:36 pm

Re: SOLUTION: Macs with USB 3 and USBtinyISP

Post by jestervineo »

Tried the hub again on my mac -- no luck.

I tried it on a Linux laptop with USB 2 ports -- no luck, but different error messages.

Code: Select all

avrdude: programmer operation not supported

avrdude: Using SCK period of 10 usec
CMD: [ac 53 00 00] [00 00 00 00]
CMD: [ac 53 00 00] [00 00 00 00]
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.
I'm really scratching my head on this one. I'm pretty sure I plugged the 6-pin cable in backwards once. Could that have fried something? It seems like the programmer is being detected via USB, and power is definitely getting to the board through the 6-pin connector. I can power my Arduino Nano from the 6-pin cable just fine, but can't program it.

I think I'll have a chance to look at the signals on a scope this weekend. Maybe that will turn up something.

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

Return to “USBtinyISP”