[visionegg] Re: Hardware for Vision Egg
- From: Andrew Straw <andrew.straw@xxxxxxxxxxxxxxx>
- To: visionegg@xxxxxxxxxxxxx
- Date: Thu, 6 Nov 2003 00:40:14 +1030
On Wednesday, Nov 5, 2003, at 22:42 Australia/Adelaide, Christophe
Pallier wrote:
Christophe Pallier wrote:
Yet, I found a company that sells USB response boxes (cf.
http://192.131.102.99/rurb/tech.html) and, if I understood correctly
an email they sent me, there would be a systematic (i.e. constant)
20millisecond delay between the key press and the registration by the
USB system. If true, this would be not too bad for many situations,
even if there are cases where this may not be sufficient.
Hum, I wrote this too quickly. I reread their email message, and it
says:
"We've established the keyboard controller has a worst-case latency
somewhere
around 7mS. A USB HID class device is then only polled with a 10mS
latency,
that brings us up to 17mS."
Well, now that you've started on the topic of USB and latency:
The USB spec allows for latencies of a single millisecond (and IIRC
0.125 msec for USB 2) on a clear bus with an operating system that
doesn't get in the way. The question boils down to whether the
operating system, device drivers and firmware allow one to attain this.
The standardized HID device drivers weren't designed with very low
latency in mind, so they don't approach the best possible performance.
However, I think we can be optimistic, because computers get more and
more gigahertz, so even a non-realtime OS may allow something near the
theoretical maximum performance.
I've developed a microcontroller/USB device (based on the Cypress
EZ-USB chip) that generally has (host to trigger output) latencies in
the single millisecond range on a dual-processor computer running
Windows 2000. Because this device doesn't use the HID drivers but some
custom low-level device drivers, it bypasses polling latency (if that
concept makes sense for an output signal). However, it behaves
erratically on a different (single processor but faster) computer with
Windows XP. I'm not sure if Windows XP is fundamentally different with
regards to device driver latency, but I wouldn't think so, so I suspect
it may be related to multiple processors or possibly my device drivers.
Regardless, there are improvements to the drivers and firmware that
could be made, possibly giving better latency and certainly giving more
precise measurements of latency.
Cheers!
Andrew
Other related posts: