USB-connected ATTiny 's

Submitted by patrik on Fri, 2010-04-09 19:29

My projects based on V-USB, a software implementation of USB v1.1 that lets you build really simple and cheap USB-devices.

To compile and burn the code, the following command is used (AVR-ISP mkII programmer is used, change the -p argument):
make && sudo avrdude -p t461 -P usb -c avrispmkII -v -U flash:w:main.hex

Also see "Linux and Atmel processors"

I have a device that doesn't work correctly. It uses a Tiny45 without crystal, and it works when connected to a hub but not when connected directly to the computer.

[212089.611468] usb 2-3: new low speed USB device using ohci_hcd and address 82
[212089.803082] usb 2-3: device descriptor read/64, error -62
[212089.993359] hub 2-0:1.0: unable to enumerate USB device on port 3

It works when connected directly to a laptop.

Some notes in troubleshooting this:
"Since the device shows up with different addresses in the log file within a period of 2 seconds, I suppose that enumeration fails. "
"At the suggestion of eric_j in #avr on freenode, I added a pair of caps, a 47 uf electrolytic and a 0.1 uf across the power near the avr. Suddenly, it all works - both on and off bus power, with and without the programmer attached. "
Found out it's probably an internal cabling problem (maybe noise interference going to the front or faulty ports) Plugged my usb thumbdrive into the rear port and it now works.