Help needed HID Mouse w/ Attiny2313, unrecognized device

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
fguida
Posts: 1
Joined: Fri Aug 06, 2010 10:16 pm

Help needed HID Mouse w/ Attiny2313, unrecognized device

Post by fguida » Tue Aug 10, 2010 10:54 pm

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

frank26080115
Rank 2
Rank 2
Posts: 43
Joined: Fri Jun 19, 2009 4:43 pm

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

Post by frank26080115 » Thu Aug 12, 2010 9:30 pm

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.

Post Reply