custom response box

Paul Gr pauls_postbus at hotmail.com
Tue Jul 26 21:22:40 UTC 2005


hi kristie,

The protocol used by your custom box differs from the protocol used by the 
SRBox, so it is not possible to use the SRBox as is. A straightforward 
serial to parallel converter wouldn't help either because EPrime assumes 
there will be one button connected to each digit of the 8-bit values. (This 
is true for both the serial and the parallel protocols.) So, the characters 
sent by you box do not comply with the protocol supported by EPrime. For 
example: the first button will send an 'a', which corresponds to a numeric 
value of 97 (or binary 01100001). EPrime will interpret the changes of the 
three active bits as 3 simultaneous button events on buttons 1, 6 and 7. 
Another problem with the serial to parallel conversion is that you will 
require 13 independent digital lines if you're planning to use all the 
buttons, whereas regular serial to parallel converter only provide 8.

I think there are several options:
1) translate the serial codes into 13 separate digital lines and extend the 
number
   of digital inputs available on the PC to handle all these lines.
2) make the firmware (embedded software) of the button box compatible with
  the SRBox protocol.
3) build a serial to serial translator device which is compatible with the 
SRBox protocol
   on one side and compatible with your button box on the other side.
4) insert some inline script to handle the serial input in EPrime yourself.

The first 3 options require detailed knowledge of digital electronics. 
Option 4 is a 'software only' solution I've seen before on a system that 
used a serial (optical) button box in an fMRI environment. The downside of 
this construction is that it doesn't work exactly the same way as regular 
EPrime input objects and that you will have to insert pieces of inline 
script after each EPrime object that should handle button box events.

I also know that some button box suppliers offer keyboard emulation drivers 
that generate keyboard events when a button is pressed. Such a driver would 
solve the problem. (Although you should measure RT accuracy to make sure the 
driver doesn't introduce unacceptable timing issues.)

best,
Paul Groot
Vrije Universiteit Amsterdam.



>From: "Kristie Willhoit" <kwillhoit at uwf.edu>
>To: <eprime at mail.talkbank.org>
>Subject: custom response box
>Date: Mon, 25 Jul 2005 16:45:19 -0500
>
>Hello, all!  I wrote once before but I think I put too much info and maybe
>no one wanted to read it all.  :-)  I'm using a custom-built 13-button
>response box that communicates via a serial cable.  Each button transmits 
>an
>ASCII character: the letters a through n for button presses, and the 
>letters
>m through z for button releases.  Does anyone know how I can get this box 
>to
>act the same as a SRBox?  I need to use it as the object to collect 
>reaction
>and movement times as well as accuracy, and I would like the RT, MT,
>accuracy, and responses to be written to the DataAid file.  I understand
>that it "just takes a bit of script", but I have exceeded my knowledge of
>the VBA language at this point.  Is there anyone willing to help me with 
>the
>script?
>
>
>
>Also, I have read in the archives that it is easiest to do this type of
>communication using parallel communication.  My supervisor has suggested
>that we simply buy a serial-to-parallel adapter cable and use that to
>connect the box to the computer instead.  Does anyone know if this would be
>a good solution?
>
>
>
>I would appreciate ANY feedback, thank you!
>
>
>
>
>
>Kristie Willhoit
>
>Research Associate
>
>University of West Florida
>
>Division of Health, Leisure, and Exercise Science
>
>11000 University Parkway
>
>Building 78, Room 140
>
>Pensacola, FL 32514
>
>(850) 474-3321
>
>kwillhoit at uwf.edu
>
>
>
>
>



More information about the Eprime mailing list