====== Acquiring Digital Codes ====== It is critical that we acquire stimulus-locked digital codes so that we can bin the data according to stimulus type during analysis. This is also essential for creating event-related averages of psychophysiological data (e.g. creating ERPs from EEG data) as it gives us the precise onset time of each stimulus. Below is a description of the hardware, software, and steps necessary for sending and acquiring such codes with PsychoPy and the BioSemi ActiveTwo system. ===== Hardware ===== * [[http://labjack.com/u3|LabJack U3 DAQ device]] * The stimulus presentation computer interfaces with this device via USB. The device then outputs the 8-bit digital signal which is relayed to the MP150 via a 37-pin ribbon cable which connects to a parallel port on the ActiveTwo USB receiver. * [[http://www.winfordeng.com/products/brksd37.php|Winford DB37 'Slim' Female Connector Breakout Board]] * This breakout board (aka terminal board or terminal block) gives us an easy way of wiring the output from the LabJack U3 to the ribbon cable. * [[http://www.biosemi.com/receiver.htm|ActiveTwo USB receiver I/O]] {{ :kpnl:activetwo:labjack.png?0x350 |}} - USB from stimulus presentation computer - 8-bit digital output from I/O lines FIO0-FIO7. - A separate wire connects each line to the breakout board. - Wires are connected to screw terminals on the breakout board. Each terminal is connected to a single pin of the female DB-37 connector. - FIO0-FIO7 should be wired to terminals 1-8 of the breakout board. - The ground should be wired to terminals 9-16 and terminal 37 of the breakout board. - A 37-pin ribbon cable connects the breakout board to the ActiveTwo USB receiver. ===== Software ===== See [[:kpnl:psychopy#Sending digital event codes|here]] for information regarding sending event codes from PsychoPy.