[visionegg] Re: Hardware for Vision Egg

  • From: "David O'Carroll" <david.ocarroll@xxxxxxxxxxxxxxx>
  • To: visionegg@xxxxxxxxxxxxx
  • Date: Thu, 6 Nov 2003 13:14:51 +1030

Note that the ActiveWire USB device has apparently been successfully used with the Psychophysics Toolbox on both Windows and Mac (OS9 only however) to achieve sub-millisceond precision in response times. There is a discussion of this general problem on the PsychToolbox web site.

http://www.psychtoolbox.org/questions.html#reaction



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


Attachment converted: ocarroll2:PGP 23.sig (pgDS/----) (000ADD64)


--

David C. O'Carroll
Physiology Discipline, School of Molecular & Biomedical Science
& Centre for Biomedical Engineering
The University of Adelaide
S.A. 5005, Australia
PH  +61 8 8303 4435    Mobile +61 418 884388
FAX +61 8 8303 3356
http://www.eleceng.adelaide.edu.au/Groups/Bugeye
http://www.mbs.adelaide.edu.au/research/physiology/
======================================
The Vision Egg mailing list
Archives: //www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

Other related posts: