Trinket Loading on Windows 8.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
revwarguy
 
Posts: 18
Joined: Fri Apr 11, 2014 5:43 pm

Trinket Loading on Windows 8.1

Post by revwarguy »

Hello, I bought a couple of Adafruit Trinkets, and am trying to load a sketch into one of them.

I updated the IDE (v 1.0.5) and so have "Adafruit Trinket 8Mhz" selected for the board, and USBTinyISP" selected for the programmer on my 64 bit Windows 8.1 system.

After wading through much confusing info and wrong versions, and convincing Windows to accept a suspicious driver anyway, I got the drivers installed (version 0.1.12.1) without error and the Device Manager shows
LibUSB-Win32 Devices ->
USBTinyISP AVR Programmer (with no yellow exclamation marks)

The Trinkets are new, and I only used one of them until the last test when I tried the other one. When either is plugged in (I am using a powered 3.0 hub which I use to program other Arduinos w/o error) , the system recognizes them as above, and the red light blinks and then goes out as expected. Nothing is connected to them except the USB cable.

Both of them have the following problem:
When I compile my sketch, it compiles without error. When I try to upload, I press the Trinket button until it blinks, hit upload, and then I get:

Binary sketch size: 4,282 bytes (of a 5,310 byte maximum)

avrdude: error: usbtiny_receive: usb_control_msg: sending control message failed, win error: A device attached to the system is not functioning.

(expected 4, got -5)


Any help?

User avatar
AnneBarela
Learn User Page
 
Posts: 757
Joined: Sat Mar 24, 2012 8:56 pm

Re: Trinket Loading on Windows 8.1

Post by AnneBarela »

The 4, -5 error sometimes comes up but it is not an error in the classic sense. Check your hardware to see if the program is running. If it appears your code is running you can safely ignore the 4, -5 issue, no worries.

Yes USB 3 hubs work fine with other Arduinos but Trinket and Gemma can act funny on them due to the bootloader code not being a true USB connection. Using a USB 2 hub is recommended.

All you need to do is quickly press the reset button then load the code. You do not have to hold it down for any length of time.

Also, if you want a signed driver for Windows 8.x, there is one at the top of the Trinket forum ("pinned at the top").

User avatar
revwarguy
 
Posts: 18
Joined: Fri Apr 11, 2014 5:43 pm

Re: Trinket Loading on Windows 8.1

Post by revwarguy »

Thanks, thekitty, for the response.

I just tried to upload the blink sketch (copied from the adafruit tutorial) which compiled and got the same upload error, but the LED isn't blinking.

If that is an acceptable error message, I'd hate to see one in anger!

I used the driver linked to on the adafruit tutorial - perhaps that link should be changed since the "pinned" driver doesn't require a Trinket user to figure out how to tell Windows to allow for unsigned drivers by rebooting, etc?

I also plugged in an old 2.0 powered hub into the back (motherboard) USB port and plugged in the Trinket that way - the system recognized the device ok, but still the same problem.

Something I didn't mention was that I did update the avrdude.conf file, as well as the ld.exe file.

Anyway, still no joy.

User avatar
AnneBarela
Learn User Page
 
Posts: 757
Joined: Sat Mar 24, 2012 8:56 pm

Re: Trinket Loading on Windows 8.1

Post by AnneBarela »

You can download the preconfigured Adafruit version of the IDE, that helps most folks.

User avatar
revwarguy
 
Posts: 18
Joined: Fri Apr 11, 2014 5:43 pm

Re: Trinket Loading on Windows 8.1

Post by revwarguy »

Yep, I did that. I also tried updating the conf file "manually" to see if that did anything. Kind of grasping at straws here.

User avatar
AnneBarela
Learn User Page
 
Posts: 757
Joined: Sat Mar 24, 2012 8:56 pm

Re: Trinket Loading on Windows 8.1

Post by AnneBarela »

You only need to tap the reset button, not hold it down. Immediately after the red light starts to flash, click the IDE upload button. Be sure you have a good USB cable. If you still have issues and have a second PC, try that with the preconfigured IDE to try to eliminate Issues. It will work, just need to find out where the bug in the drink is.

User avatar
revwarguy
 
Posts: 18
Joined: Fri Apr 11, 2014 5:43 pm

Re: Trinket Loading on Windows 8.1

Post by revwarguy »

Yes, I've just been pressing the button momentarily, not holding it down, just an unfortunate choice of words in the above post. I've tried 2 different cables, both of which are in use on other things w/o issue. I'll try removing the arduino IDE (again) and installing the pre-configured Adafruit support version.

I agree, it is something wrong here, and I am sure others get this to work.

Thanks, thekitty, for your help.

User avatar
revwarguy
 
Posts: 18
Joined: Fri Apr 11, 2014 5:43 pm

Re: Trinket Loading on Windows 8.1

Post by revwarguy »

OK, I went to another, older XP machine and got everything to work. No error message, just works. Used the USB cable from my 8.1 system.

Using the same USB cable, on the 8.1 system, I get the error, and program doesn't load.

I went out and got another USB mini cable, tried it on the 8.1 system, got the error message, but the program loaded this time!

I cannot really explain that, but I don't think I have the energy left to pursue it.

One thing - the XP system takes so long to compile (I'm talking the blink program here), the Trinket stops blinking before the compile phase completes. Anyone know what is going on with the bootloader here - i.e. exactly when is the "window of opportunity" for the bootloader to accept the upload, and what handshaking is done here?

User avatar
AnneBarela
Learn User Page
 
Posts: 757
Joined: Sat Mar 24, 2012 8:56 pm

Re: Trinket Loading on Windows 8.1

Post by AnneBarela »

That's been seen a couple times: for very slow machines, you have to gauge the compile-load time and time the button push as the bootloader is active for only 10 seconds.

Strange your 8.1 box isn't playing well.

PierreFreyssinet
 
Posts: 39
Joined: Fri Feb 14, 2014 5:07 am

Re: Trinket Loading on Windows 8.1

Post by PierreFreyssinet »

Hi guys,
I do have exactly the same problem Revwarguy has documented. Same config : Windows 8.1, 64 bit.
I ha dbought two Gemmas and one Trinket, and could get none of those to be programmed. In 95 % of my attempts, I had the "could not find USBtiny (adress)".
Only once did I get a different message (albeit another failureone) : "avrdude: error: usbtiny_transmit: usb_control_msg: sending control message failed, win error".
I do have the Adafruited version of the Arduino IDE, and it works fine with my Flora.
have tried installing the adequate USBtiny drivers in the "Windows cheat" mode, using "option #7 ".
I have the tried the signed version mentionned by TheKitty and available in the Trinket forum.
I have installed, and the uninstalled a dozen times the drivers.
When installed, Device Manager would announce I had a LibUSB-Win32 Devices, and name it USBTiny in the sub-category.
Most of the time yet, the USB bus controller (my system is in French, so my translation might slightly differs from what you are used to) would end up showing a yellow flag and saying "unknown USB peripheral (request for a peripheral description failed).

Pfoouuu....

Could somebody smarter or more experienced than me help me, giving step by step idiot-proof instructions so I could clean up the mess and get Gemma or Trinket to work?

Going to sleep in despair for now.

Thank you for reading anyhow.

Pierre

User avatar
AnneBarela
Learn User Page
 
Posts: 757
Joined: Sat Mar 24, 2012 8:56 pm

Re: Trinket Loading on Windows 8.1

Post by AnneBarela »

It sound like you did have the driver installed correctly. The control error seems to be resolved by most people because there are multiple versions of avrdude on the system and somehow it's getting the wrong one. Check and see and if so then you'll have to remove the other one (move it off somewhere it cannot be found) and try again.

You should post in the Trinket forum for people to see Trinket issues.

PierreFreyssinet
 
Posts: 39
Joined: Fri Feb 14, 2014 5:07 am

Re: Trinket Loading on Windows 8.1

Post by PierreFreyssinet »

Thank you, TheKitty
I promise I will post on the Trinket forum next time, but my problem is for Gemma and/or Trinket. Anyhow, what do you mean (i.e. what actions should I take) when you write (quote) "Check and see and if so then you'll have to remove the other one (move it off somewhere it cannot be found)".
Sorry if I sound dumb, but maybe I am a bit dumb. ;-)
Pierre

PierreFreyssinet
 
Posts: 39
Joined: Fri Feb 14, 2014 5:07 am

Re: Trinket Loading on Windows 8.1

Post by PierreFreyssinet »

PierreFreyssinet wrote:Thank you, TheKitty
I promise I will post on the Trinket forum next time, but my problem is for Gemma and/or Trinket. Anyhow, what do you mean (i.e. what actions should I take) when you write (quote) "Check and see and if so then you'll have to remove the other one (move it off somewhere it cannot be found)".
Sorry if I sound dumb, but maybe I am a bit dumb. ;-)
Pierre
I have tried again, uninstalling and re-installing the driver. I still get the yellow flag in the USB bus controller. If I ask for "properties", it says : "Wondows has stopped this peripheral because it creates problems." And then, it says (code 43).
Does that make sense ?

Pierre

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

Return to “USBtinyISP”