EprimeParallelPort - MRC CBU Imaging Wiki
location: EprimeParallelPort

Testing the parallel port as an input device

The question is whether a parallel port is fast and reliable enough to enable millisecond precise data acquisition. I have conducted a few simple experiments to try to answer that question.

First, I have used my own program, CAST, which accepts input from either a PIO card or a parallel port. I wrote a simple script that plays a sound file and presents a large bitmap on screen on every trial. This was done to maximise the workload and to make the test as representative of a real experiment as possible. Each trial was triggered by a pulse from our scanner simulator, every 1000 ms. In total 1000 trials were used.

Comparing the results for the PIO card and the parallel port, I was not able to find any differences. In both cases not a single pulse was missed, the lowest and highest inter-trial times recorded were about 3-4 ms apart (+/- 2 ms) and the standard deviation of inter-trial times was about 0.5 ms.

The only difference I could find, using another program, was in the maximum number of polls that could be performed for both cards. The parallel port was slower, but still relatively fast at about 200 polls per ms. In real life the hardware will only be polled once every ms, so this process will take up about 0.5% of the processing time. The PIO card is about 6-7 times faster.

In addition to this an experiment using E-Prime itself was performed. The setup was the same as for the CAST experiment: playing a sound file and presenting a bitmap every second, triggered by the scanner simulator. Again, 1000 trials were performed. The results were comparable to the results obtained with CAST, except that there was a slightly greater difference between the lowest and highest inter-pulse values (+/- 5 ms) and the standard deviation was a little bit higher at 0.56 ms.

It so happens that a paper was just published in Behavior Research Methods investigating the use of a parallel port for psychological experiments (“A PC parallel port button box provides millisecond response time accuracy under Linux”, Neil Steward, BRM 2006, 38(1), 170-173). As the title suggests, the conclusion was that the parallel port is easily capable of measuring the time of a response with millisecond accuracy. The operating system used was Linux, which allows for a more direct access to hardware than Windows. But this experiment at least shows that the

CbuImaging: EprimeParallelPort (last edited 2013-03-07 21:23:01 by localhost)