Presentation is loading. Please wait.

Presentation is loading. Please wait.

Control of (some) External Devices using MatLab/Cogent Steffan Kennett,

Similar presentations


Presentation on theme: "Control of (some) External Devices using MatLab/Cogent Steffan Kennett,"— Presentation transcript:

1 Control of (some) External Devices using MatLab/Cogent Steffan Kennett,

2 Topics covered Vocal Reaction Time (see voiceRT.m): Acquiring data Calculating reaction time Calibration Parallel Ports (see Stimuluscheck.m): Set-up procedure Implementation in code Problems (addresses, timing) Eye-tracking (see Eyetracker_demo.m): Acquiring data. Meaning from data (calibration)

3 Parallel Ports Installation: Excellent documentation at point 3.12 of cogmanv125.pdf Extract UserPort.zip follow instructions. Use function “outportb(port_address,value)”. See Stimuluscheck.m Digital Signal Up to 8 lines independently controlled Use signal to switch on stimuli (lights, taps, TMS etc.) –This requires some form of switch box to transfer signal and power to the external stimuli (e.g., LEDs or tappers) Use signal to trigger EEG, fMRI, TMS. –Requires the parallel port cable is appropriately wired for your specific device

4 Parallel Ports Address: usually 888, could be 632, 956. Refers to specific parallel port. Value: any integer from 1 to 255 Value is actually the decimal version of an 8-bit binary number (1 1 1 1 1 1 1 = 255). LineBinary valueDecimal value 1000000011 2000000102 3000001004 4000010008 50001000016 60010000032 70100000064 810000000128 Lines 3 and 5 would be value = 4 + 16 = 20

5 Eye-tracking Calibration tip: Once you’ve set-up the eye-tracker you will have to carry out the tracker- software’s own calibration procedure. Even having done this, start each experiment, or better, each block of trials with a mini-calibration of your own. Use jumping crosses of known visual angle (see. Choose these visual angles to be relevent to your experiment (e.g., close to fixation point if you do not want saccades in your experiment). See jumping_cross.m. Cogent only supports the ASL 5-series (e.g., ASL 5000), which is the eye-tracker currently installed in the MRI scanners at 12, Queen Square. Good documentation is in G2UsrManv124.pdf. See pages D10, E5, F21 and section I. See also sample m-file Tracker.m (Samples folder) and Eyetracker_demo.m (Matlab course download)

6 Vocal Reaction Time Uses built-in microphone or one plugged into the sound card of your PC. Employs “config_sound” prior to “start_cogent” Commands used (input/output variables in italics): – preparerecording(duration_in_ms) – recordsound – waitrecord – sound_vector = getrecording See voiceRT.m for a fully commented, working script – RT is calculated by measuring the first sample which exceeds a threshold level (user sets this) and working out the time since the stimulus was presented.


Download ppt "Control of (some) External Devices using MatLab/Cogent Steffan Kennett,"

Similar presentations


Ads by Google