beginners-question parallel port
David McFarlane
mcfarla9 at msu.edu
Sat Oct 22 16:45:11 UTC 2011
Maartje ,
And if you want to look like a real programmer instead of a novice,
you will replace the "magic numbers" with named constants, thus,
Const OutPort as Integer = &h0378
Const BioPacTrigger as Integer = &h01
WritePort OutPort, 0
Stimulus.OnsetSignalEnabled = True
Stimulus.OnsetSignalPort = OutPort
Stimulus.OnsetSignalData = BioPacTrigger
Stimulus.OffsetSignalEnabled = True
Stimulus.OffsetSignalPort = OutPort
Stimulus.OffsetSignalData = 0
-- David McFarlane, Professional Faultfinder
Quoting Paul Groot:
> Hi Maartje,
>
> It is not required to open a classic LPT port. EPrime directly writes
> to the output registers of the IO-port. However, it is a good think to
> initialize the state of the output pins at the start of your
> experiment with a single line of inline script:
>
> WritePort &H378, 0
>
>
> (although you could also use 3 lines of code to configure the
> onsetsignal method on the first object using code 0 to achieve the
> same thing)
>
> best,
> Paul
>
>
> 2011/10/21 mrtj:
>> I have a beginners-question regarding my E-prime programming.
>> I want to send event-related triggers to BioPac and after doing some
>> research I figured that an Inline with the following should do the
>> trick:
>>
>> Stimulus.OnsetSignalEnabled = True
>> Stimulus.OnsetSignalPort = &H378
>> Stimulus.OnsetSignalData = 1
>>
>> Stimulus.OffsetSignalEnabled = True
>> Stimulus.OffsetSignalPort = &H378
>> Stimulus.OffsetSignalData = 0
>>
>> However, it seems to me that I should define/open/set-to-zero the Port
>> at the beginning of my experiment first. Am I correct to assume, and
>> if do... how can I do this.
>>
>> I hope you can help me out. Many thanks!
>> Maartje
--
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.
More information about the Eprime
mailing list