Millisecond Forums

Problem with TTL signals

https://forums.millisecond.com/Topic15054.aspx

By AnnaShu - 11/24/2014

Hi all,
I have a problem with TTL signals sent through parallel port to my EEG recording software SCAN 4.3.
I have designed a verbal dot probe paradigm in inquisit 3 and my cue signals work fine, however, target marker do not ppear in the SCAN software.

Here is how I have defined the ports:


###########################
cue ports
###########################

<port pleasant_L_signal>
/ port = lpt1
/ subport = data
/ items = ("00000001")
</port>
1

<port pleasant_R_signal>
/ port = lpt1
/ subport = data
/ items = ("00000011")
</port>
3

<port unpleasant_L_signal>
/ port = lpt1
/ subport = data
/ items = ("00000111")
</port>
7


<port unpleasant_R_signal>
/ port = lpt1
/ subport = data
/ items = ("00001111")
</port>
15

<port neutral3_L_signal>
/ port = lpt1
/ subport = data
/ items = ("00011111")
</port>
31

<port neutral3_R_signal>
/ port = lpt1
/ subport = data
/ items = ("00111111")
</port>
63

##########################
target ports
##########################

****************pleasant****************

<port pleasantleft_valid_signal>
/ port = lpt1
/ subport = data
/ items = ("11100000")
</port>
224

<port pleasantleft_invalid_signal>
/ port = lpt1
/ subport = data
/ items = ("11110000")
</port>
240

<port pleasantright_valid_signal>
/ port = lpt1
/ subport = data
/ items = ("01111111")
</port>
127

<port pleasantright_invalid_signal>
/ port = lpt1
/ subport = data
/ items = ("11111111")
</port>
255




***********unpleasant*******************

<port unpleasantright_valid_signal>
/ port = lpt1
/ subport = data
/ items = ("10000000")
</port>
128

<port unpleasantright_invalid_signal>
/ port = lpt1
/ subport = data
/ items = ("11000000")
</port>
192

<port unpleasantleft_valid_signal>
/ port = lpt1
/ subport = data
/ items = ("11111000")
</port>
248

<port unpleasantleft_invalid_signal>
/ port = lpt1
/ subport = data
/ items = ("11111100")
</port>
252

**************neutral*****************

<port neutral3left_valid_signal>
/ port = lpt1
/ subport = data
/ items = ("01010101")
</port>
85

<port neutral3left_invalid_signal>
/ port = lpt1
/ subport = data
/ items = ("01111110")
</port>
126

<port neutral3right_valid_signal>
/ port = lpt1
/ subport = data
/ items = ("01111000")
</port>
120

<port neutral3right_invalid_signal>
/ port = lpt1
/ subport = data
/ items = ("01111100")
</port>
124

and here is what my trials look like (one example):

<trial pleasantright_valid_isi50>
/ pretrialsignal = (lpt1, 96)
/ response = timeout (1700)
/ correctresponse = (112)
/ validresponse = (104, 112)
/ responsemessage = (noresponse, pnoresponse, 50)
/ responsemessage = (112, pkorrekt, 50)
/ responsemessage = (104, pfalsch, 50)
/ stimulustimes = [0=fixation; 500= pleasantright, neutral_1_left, pleasant_R_signal; 1000= erasewords_right, erasewords_left; 1050= proberight, pleasantright_valid_signal; 1200=eraseprobe_right]
</trial>


What have I done wrong? Any help is greatly appreciated!
Anna




By Dave - 11/24/2014

Once a port stimulus is "displayed" via a <trial>'s /stimulustimes or -frames, it *remains* raised for the entire duration of the trial.

/ stimulustimes = [0=fixation; 500= pleasantright, neutral_1_left, pleasant_R_signal; 1000= erasewords_right, erasewords_left; 1050= proberight, pleasantright_valid_signal; 1200=eraseprobe_right]

To be able to discern between the two TTL signals highlighted above

<port pleasant_R_signal>
/ port = lpt1
/ subport = data
/ items = ("00000011")
</port>

<port pleasantright_valid_signal>
/ port = lpt1
/ subport = data
/ items = ("01111111")
</port>

you'll want to set all bits to low sometime between them. I.e. define

<port allbitstolow>
/ port = lpt1
/ subport = data
/ items = ("00000000")
</port>

and do something along the lines of

/ stimulustimes = [0=fixation; 500= pleasantright, neutral_1_left, pleasant_R_signal; 1000= erasewords_right, erasewords_left, allbitstolow; 1050= proberight, pleasantright_valid_signal; 1200=eraseprobe_right]
By AnnaShu - 11/24/2014

Hi Dave,

Thank you very much, this works perfectly!

Anna