This article applies to:
This sample illustrates communication between E-Prime 1.x and a programmable port, such as the parallel port.
To read a signal from the port, you can use the Port Device in E-Prime, an input device that can be added via the Devices tab of the Experiment object's property pages in E-Studio.
To send a signal to the port, you should use the WritePort command in an Inline in your experiment. For more information, please refer to LICENSE: Parallel port hardware key users receive "This system is in violation of the licensing agreement" when opening E-Studio .
To send or read signals, you must know the proper address of your programmable port. This address can be found by opening the Windows Device Manager tab, and navigating to Ports. Select the parallel (LPT or printer) port, click the Properties button, and select the Resources tab. The address of the currently accessible port will be shown.
NOTE: This sample does not apply to serial communications. The serial port has its own protocol for transmission of signals.
NOTE: BasicPortRT assumes that the parallel port is configured for standard mode. If this program does not respond, you may need to modify the BIOS settings for the parallel port.
This program illustrates communication with a device connected to the parallel port. The device used to design this experiment was a single button response device with two LEDs (one green, one red). The mapping of these components is as follows:
red lamp = bit 2
green lamp = bit 1
button = bit 7
The Port device is enabled in the Expeirment Object Devices tab, and input via the port is enabled on the Stimulus object (i.e., the object collecting input). The bits to watch for input are designated in the Input properties for the Stimulus object.
The program presents the subject with a fixation and then a stimulus (X or Y). The subject is to respond by pressing the button on the device when an X is presented. When a Y is presented, the subject should not respond. The input is scored for accuracy and reaction time.
Please sign in to leave a comment.