Thread View: comp.sys.next.programmer
2 messages
2 total messages
Started by Bill E. Eickmeier
Mon, 10 Aug 1992 13:55
using a NeXT for Reaction Time Experiments
Author: Bill E. Eickmeier
Date: Mon, 10 Aug 1992 13:55
Date: Mon, 10 Aug 1992 13:55
17 lines
1122 bytes
1122 bytes
Some people here are interested in doing reaction time experiments with sound and/or images. Essentially, we'd simply like to measure the precise time from when a sound or image is displayed until the subject presses a key on the keyboard or mouse. Using a NeXT, what sort of time resolution could we expect - 1ms, 10ms, more? I've just recently moved and don't have access to a NeXT (but not for long, hopefully), so I can't test it myself. Has anyone experimented with this? Thanks, Bill Bill E. Eickmeier, bee@watarts.uwaterloo.ca Department of Psychology, University of Waterloo, Waterloo, Ontario, N2L 3G1 room: PAS 1102 phone: 519-885-1211 x6638 fax: 519-746-8631
Re: using a NeXT for Reaction Time Experiments
Author: Izumi Ohzawa
Date: Tue, 11 Aug 1992 07:07
Date: Tue, 11 Aug 1992 07:07
54 lines
3159 bytes
3159 bytes
In article <9208101355.AA25079@watarts.uwaterloo.ca> "Bill E. Eickmeier" <bee@watarts.uwaterloo.ca> writes: > >Some people here are interested in doing reaction time experiments with >sound and/or images. Essentially, we'd simply like to measure the >precise time from when a sound or image is displayed until the subject >presses a key on the keyboard or mouse. Using a NeXT, what sort of time >resolution could we expect - 1ms, 10ms, more? Keyboard and mouse events are time stamped with 1/68 second (14.7msec) resolution [see Events section of the NeXT's Concepts manual]. I don't know how reliable the time records are but this should give you some idea. 68Hz is the frequency of vertical refresh of the display. Hard part is getting the exact onset/offset time of sound or image display. I don't think this is possible to attain via normal (NeXT recommended) programming practice of going through the ApplicationKit and Display PostScript. You could directly write to screen memory for image, and this will give you some control over when the stimulus is displayed. You also have to monitor the vertical retrace and count that because the video frame refresh is the granularity of visual stimulus presentations. For sound, it is also difficult to know from a program exactly when the actual sound come out. If you are willing to use some external hardware (like external key switches) instead of keyboard and mouse, then you can easily achieve 50 microsec (0.05 msec) resolution of subject responses by using the DSP56001 chip as an intelligent timing device. You have to connect a switch to the NeXT DSP port and write a short DSP program (most likely in assembly language for 56001). Along with the switch input, you could actually input a signal which indicates onset of sound or image. For this, you will need some external electronics to detect directly the onset of sound or image from the actual sound output or from the video. Sound onset detection should be fairly simple. Image onset detection can be done either directly sampling the video signal at the correct timing, or can be done by a photo-cell watching the location of interest. My opinion is that, if you really want a reliable scheme, the DSP timer and use of some external hardware is the only way to go. Trying to do it with just the NeXT hardware, it seems to me, is a futile fight with the pre-emptive multi-tasking OS. -- Izumi Ohzawa [ $BBg_78^=;(B ] USMail: University of California, 360 Minor Hall, Berkeley, CA 94720 Telephone: (510) 642-6440 Fax: (510) 642-3323 Internet: izumi@violet.berkeley.edu NeXTmail: izumi@pinoko.berkeley.edu
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads