Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ATMega328P "AVRDude: Could not find USBTiny Device (0x1781/0xc9f)"

Good afternoon,

I recently assembled an ATMega328P based micro-controller PCB of my own design. I feel good about the circuit itself as I managed to upload the Arduino Blink sketch via the Sparkfun AVR Pocket Programmer.

After uploading this sketch I noted that the ATMega was using its internal oscillator. I didn't feel comfortable changing fuse bits I attempted to install the Arduino boot loader again through the Arduino IDE.

At this point a number of errors were thrown but the board started to use it's external clock and run the Blink program correctly.

I can no longer however upload any further code to the chip, since I couldn't get AVRDude to work on my Mac, I installed AVRDude 5.1 on my Windows 8.1 PC.

I then connected the device and sent:

avrdude -c usbtiny -p atmega328p

This simply returned:

avrdude: Error: Could not find USBtiny device ( 0x1781/0xc9f)

Have I inadvertently skewed with the chip's fuse bits? How can I save this chip??

UPDATE: I managed to install AVRDude 6.0.1 and now the error reads:

avrdude: initialization failed, rc=-1

Full result is seen here:

Terminal Return

like image 421
user3185748 Avatar asked Jun 15 '15 23:06

user3185748


5 Answers

Ran into this error message too, with an AdaFruit 3.3V trinket pro. Note that you need to activate the boot loader FIRST by pressing the reset button. The red LED sort of flashes a bit, only THEN start the upload from the IDE. Else you get the error above.

Don't wait too long either, else you miss the upload window, and you get the error again. The red LED must flash.

I thought I had damaged my board too, but the procedure is described in the documentation. (An Arduino Uno does not need this.)

like image 59
RickJansen Avatar answered Sep 28 '22 21:09

RickJansen


From the Adafruit Support Channel: https://forums.adafruit.com/viewtopic.php?f=24&t=97879

Try putting a cheap/old USB hub between the Mac and the Gemma.

There's a known issue with the Gemma bootloader having trouble talking to USB-3 ports, which are standard on all recent Macs. Older and lower-cost USB hubs use USB-2, and act as protocol translators.

Also later:

verify your USB cable by connecting a known-working device with it. We see at least one person a day get caught by a charge-only cable.

like image 44
JayCrossler Avatar answered Sep 28 '22 21:09

JayCrossler


I had a similar problem with a Adafruit Gemma; I found that on a Mac, both on-Mac USB ports didn't work. I connected it to the display USB dock and the connection worked.

like image 23
Ben Arent Avatar answered Oct 01 '22 21:10

Ben Arent


I had the same error, "avrdude: Error: Could not find USBtiny device (0x1781/0xc9f)", with a MacBook Air. tried it with a USB 2.0 hub and it works fine. I had to use the same fix with my Windows desktop.

like image 28
Jeff Avatar answered Sep 29 '22 21:09

Jeff


I had the same question and scavenged the web for a solution, I inadvertently stumbled upon the answer. Drivers, at first I did a general search for usbtinyisp drivers and found adafruits website. But the page it takes you to does not have a link to the correct drivers. I managed to find this page by manually typing in the address. Hope it helps! (also make sure and completely uninstall the USBtinyISP from device manager including any drivers you might have previously had installed.)

https://learn.adafruit.com/usbtinyisp/drivers once downloaded a list of boards will come up, look to the far right of each option and you should see in parenthesis TINYusbISP make sure that one is checked as well as FEATHER WICED.

like image 27
XxZorro13xX Avatar answered Sep 28 '22 21:09

XxZorro13xX