TTL pulse

David McFarlane mcfarla9 at msu.edu
Thu Apr 9 18:18:48 UTC 2009


Dave,

At this stage you probably need to explore your specific hardware 
setup in depth a little more, and that is not something that I can do 
remotely, so you need to contact the IT staff at your company, and 
they will need some in-depth knowledge about using a parallel 
port.  For one thing you need to make sure that &H378 is the correct 
port number for your particular use, and that you have wired up to 
the correct pins on the connector.  If it were me I would try using 
the old DOS debug command or something equally primitive so that I 
could make sure that I fully understood the hardware at hand before I 
tried throwing E-Prime at it.

PST has a Knowledge Base article about this at 
http://www.pstnet.com/e-prime/support/kb.asp?TopicID=1320 
(registration & login required), you might also look at another 
article at http://www.pstnet.com/e-prime/support/kb.asp?TopicID=1318 
.   You might also try Google to find more technical articles on the 
parallel port in general.

Oh, and as long as we're using hex notation, let's change
    WritePort &H378, 255
to
    WritePort &H378, &HFF
shall we?

Good luck,
-- David McFarlane, Professional Faultfinder


>Hi David,
>
>Thanks for your advice, I have tried what you have suggested however I
>still don't seem to be getting a pulse. Can you suggest what the settings
>in the parallel port menu or how to set all bits to 0 at the beginning (I
>have put an inline at the beginning with WritePort &H378, 0 in.
>
>Thanks Dave
>
>--On 08 April 2009 11:32 -0400 David McFarlane <mcfarla9 at msu.edu> wrote:
>
> >
> > At 4/6/2009 04:27 AM Monday, David Moore wrote:
> >> Dear all,
> >>
> >> I've written a script to present attentional tasks to participants
> >> however I need to send a TTL pulse to an external device at random
> >> intervals.
> >>
> >> I'm using eprime 2 and I have added the parallel port in the devices and
> >> left the standard settings. I've then put in an inline with the command
> >> WritePort &H378, 255 however I am not getting any pulse.
> >>
> >> Can anyone help?
> >>
> >> Dave
> >
> > To send a pulse, you must both turn the pulse on and then turn it
> > off, with some duration in between.  WritePort &H378, 255 will just
> > set all bits to 1, you still need to wait a moment and then send them
> > back to 0.  Something like this:
> >
> > WritePort &H378, 255  ' all bits to 1
> > Sleep 20  ' wait 20 ms
> > WritePort &H378, 0  ' all bits back to 0
> >
> > Of course, you should first initialize all bits to 0 way at the start
> > of your program.  And this assumes that &H378 is the correct port for
> > your case, you may need to contact your IT staff to verify
> > that.  Finally, I think PST has a sample program at their website
> > that you can download to demonstrate some of this.
> >
> > -- David McFarlane, Professional Faultfinder


--~--~---------~--~----~------------~-------~--~----~
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