Page 1 of 1

Help needed HID Mouse w/ Attiny2313, unrecognized device

Posted: Tue Aug 10, 2010 10:54 pm
by fguida
Hello All,

I'm having trouble getting the HID Mouse sample project working. I built the basic zener and vreg circuits on a breadboard, but can't get either one to enumerate properly.

The V-USB package is documented very nicely. I've followed all the instructions as far as I can tell, but must be missing something, or have a basic hardware/noise problem. The code compiles and downloads fine, and I've flashed other test programs so I know the chip and programmer are okay.

Here's my system info:

uC : attiny2313-20PU, Vcc = 3.3V, Clk = 12MHz
OS : Vista Ultimate, SP2
WinAVR : 20100110 (gcc 4.3.2)

I checked the signal lines at the chip using a scope. Mutiple packets are being sent during the enumeration process, and they look clean enough. I'm still green with USB, but I suspect one of the following is occuring:

1. I've configured something wrong in the firmware (usbconfig.h or usbdrv.h)
2. The signals are bad, so the packets are not received by the uC (or misinterpreted), and the appropriate response isn't sent.
3. The uC correctly processes incoming packets and responds, but the reponse is not received by the pc.

My assembly is rusty, but can someone suggest a small code snip to flash an LED when an interrupt is detected, and/or when an incoming packet has been correctly parsed?

Any help is appreciated.

Thanks in advance,
Frank

Re: Help needed HID Mouse w/ Attiny2313, unrecognized device

Posted: Thu Aug 12, 2010 9:30 pm
by frank26080115
unable to enumerate usually means a bad config or hardware issues, assuming your initialization sequence is correct (interrupts enabled, watchdog disabled or taken care of, etc)

if you really are seeing multiple packets being sent, then I suspect you have a bad config, so double check everything, especially the string lengths

don't edit anything in usbdrv.h unless you have a good reason to

There is no easy way to hook anything into the interrupt routine unless you actually edit usbdrvasm.S, have you tried the various optional hooks described in the usbconfig.h? you can flash your LEDs in there if you want.