| www.cortex.salk.edu | September 06, 2008 |
|
:: Style
|
(The following information was contributed by Giuseppe Bertini.)
A digital signal (such as a spike or the state of a switch) into the data I/O board in the Cortex computer, is represented by a 0 or 5V (off or on) current applied to one of the DIG.IN pins (relative to DIG.GND). If the input device that you want to use is not designed to generate the appropriate tension, then you must draw current from the PC bus. This was the case for a button box (used in finger-tapping tasks and different from those put together at the NIMH shop) in which the circuit between each of four leads and a common is simply closed by pressing the corresponding button. The proper wiring is as follows: - Four 10K resistors were connected from the +5V PC Bus pin to DIG.IN #0, 1, 2, and 3, respectively. - The 4 button-box pins were also connected to DIG.IN #0, 1, 2, and 3. - Finally, the box's common lead was connected to DIG.GND. Note that with this configuration, the state of the digital port is opposite to the usual convention. For example, if a monkey is holding the bar, and assuming that the bar is connected to DIG.IN 3, then (int)(DEVinp(0,3)&(1<<4)) returns 1, which sort of makes sense. However, when a subject presses button #4 on this box, the return value to the same call changes from 1 to 0. |