Link to home
Start Free TrialLog in
Avatar of 1_21gigawatts
1_21gigawatts

asked on

USB HID read speed

I am creating a new USB device, using the HID type descriptor. I have used a template for a game controller with a single slider and no buttons to get the smallest report descriptor:

PROGMEM const char usbHidReportDescriptor[24] = {
    0x05, 0x01,                    // USAGE_PAGE (Generic Desktop)
    0x09, 0x05,                    // USAGE (Game Pad)
    0xa1, 0x01,                    // COLLECTION (Application)
    0xa1, 0x00,                    //   COLLECTION (Physical)
    0x05, 0x01,                    //     USAGE_PAGE (Generic Desktop)
    0x09, 0x36,                    //     USAGE (Slider)
    0x15, 0x00,                    //     LOGICAL_MINIMUM (0)
    0x25, 0x7f,                    //     LOGICAL_MAXIMUM (127)
    0x75, 0x08,                    //     REPORT_SIZE (8)
    0x95, 0x01,                    //     REPORT_COUNT (1)
    0x81, 0x02,                    //     INPUT (Data,Var,Abs)
    0xc0,                          //     END_COLLECTION
    0xc0                           // END_COLLECTION
};

Open in new window

My problem is that this only seems to get read every 35mS or so, and I need to be able to go at least three times as fast. I tried this with a more complicated report descriptor (X & Y 2-byte axes and 8 buttons) and the speed was about the same.

I'm developing on win 7-64. Is this a windows limitation? Can I not send data over an HID interface faster than this? If not, I'll have to go to a much messier plan B, involving an FTDI device and whatever drivers that entails.

Also, I wasn't really sure where to ask this, so if you have any ideas on that...
Avatar of 1_21gigawatts
1_21gigawatts

ASKER

C# on the Windows end, C  (WinAVR) & V-USB architecture on the AVR end.
ASKER CERTIFIED SOLUTION
Avatar of 1_21gigawatts
1_21gigawatts

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial