trinket 5v avrdude error usbtiny_received (expected 4, got -

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
hyp3rMC
 
Posts: 30
Joined: Wed Mar 15, 2017 6:51 pm

trinket 5v avrdude error usbtiny_received (expected 4, got -

Post by hyp3rMC »

Hi there,
I need some help in uploading code to the trinket 5v. I have tried it with arduino IDE but it keeps giving me this message.
arduino_ide_response.jpg
arduino_ide_response.jpg (170.34 KiB) Viewed 1889 times
I check with avrdude and it reads the trinket ok from what I can tell...
avrdude_response.jpg
avrdude_response.jpg (63.49 KiB) Viewed 1889 times
I can't seem to upload anything on the trinket 5v weather I run on 8 or 16MHz. I have followed through with the learning guide as well as updated avrdude.conf from the guide. trinket green light is on and stable. I press reset as before uploading and the red light blinks as the guide indicates. Here are the settings on my tools in arduino IDE;
board_info.jpg
board_info.jpg (47.01 KiB) Viewed 1881 times
I'm at my wits end so if you can please shed a light on this, I would really appreciate it.

Thank you!

User avatar
hyp3rMC
 
Posts: 30
Joined: Wed Mar 15, 2017 6:51 pm

Re: trinket 5v avrdude error usbtiny_received (expected 4, g

Post by hyp3rMC »

I just want to give an update...
uploading a sample hex file from the guide was successful via avrdude. I was able to upload the blink sketch via avrdude with this command: avrdude -c usbtiny -p attiny85 -D -U flash:w:trinketblink.hex
avrdude_blink.jpg
avrdude_blink.jpg (108.88 KiB) Viewed 1879 times
Arduino IDE is still no go...
Last edited by hyp3rMC on Fri Aug 11, 2017 8:46 am, edited 1 time in total.

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

Re: trinket 5v avrdude error usbtiny_received (expected 4, g

Post by adafruit_support_rick »

That error code simply indicates a retry. Does the sketch work after the upload completes?

User avatar
hyp3rMC
 
Posts: 30
Joined: Wed Mar 15, 2017 6:51 pm

Re: trinket 5v avrdude error usbtiny_received (expected 4, g

Post by hyp3rMC »

Thank you for the quick reply. No the sketch doesn't work at all.

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

Re: trinket 5v avrdude error usbtiny_received (expected 4, g

Post by adafruit_support_rick »

Go into Arduino Preferences and check off the box for verbose on upload.

Post the entire upload trace here

User avatar
hyp3rMC
 
Posts: 30
Joined: Wed Mar 15, 2017 6:51 pm

Re: trinket 5v avrdude error usbtiny_received (expected 4, g

Post by hyp3rMC »

Thank you very much Rick. I will do that tonight once I get home. I will continue to try the upload and will post the output here later. I appreciate it.

User avatar
sutliff2000
 
Posts: 15
Joined: Sun Mar 04, 2018 5:09 pm

Re: trinket 5v avrdude error usbtiny_received (expected 4, g

Post by sutliff2000 »

Newbie here.
I am also working on the Kaleidoscope Eyes (Trinket-Powered NeoPixel LED Ring Goggles) and I also am getting the avrdude: error: usbtiny_receive: (expected 4, got -5) error.

I have tried different ports, I've tried different cables. I ensured that I uploaded while the trinket was blinking. I've tried both 8 MHz and 16 MHz. I've made sure the Programmer is set to USBtinyISP.

I have tinkered with breadboards and the Uno Ardino with success, but I don't know what to try next. I've run out of cables and ports.

Any suggestions?

Thanks

User avatar
hyp3rMC
 
Posts: 30
Joined: Wed Mar 15, 2017 6:51 pm

Re: trinket 5v avrdude error usbtiny_received (expected 4, g

Post by hyp3rMC »

What I found out with dealing with the trinket is that you have to hit the reset button just the right time for the sketch to upload correctly. In my case, I have to hit the reset button a couple of seconds after I clicked on compile and upload in Arduino IDE. Try to experiment with that to see if your sketch uploads. I would also suggest to start with a simple sketch like a blinking LED just to see if it uploads correctly. Once you have that figured out, then you can try your sketch that you want to upload.

That's all I can advise for now. Maybe support will have a better answer if you still can't upload the sketch into the trinket.

User avatar
sutliff2000
 
Posts: 15
Joined: Sun Mar 04, 2018 5:09 pm

Re: trinket 5v avrdude error usbtiny_received (expected 4, g

Post by sutliff2000 »

hyp3rMC - thanks for the advice.
I tried it using increasing second intervals. But with no luck. Both with the sketch for the goggles and the basic blink. Same results.
I checked that the port was at com3 and the board and programmer were correct. I'm sad as I was hoping to use this for two other projects once I got this rolling.

Any other insights would be welcome.

Thanks

User avatar
hyp3rMC
 
Posts: 30
Joined: Wed Mar 15, 2017 6:51 pm

Re: trinket 5v avrdude error usbtiny_received (expected 4, g

Post by hyp3rMC »

Hmm... I'm not really sure what else would work. Have you tried using avrdude to load a sketch? Of course, the sketch would be in a hex file. I believe the learning center here at adafruit has an example hex file that you can load. Maybe, go back to the trinket tutorial and run through it again just to make sure you're not missing something.
Take a look at this learning guide and see if that would help you debug what is wrong.
https://learn.adafruit.com/introducing- ... th-avrdude

All the best!

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

Return to “USBtinyISP”