parallel port communication: event markers

David McFarlane mcfarla9 at msu.edu
Fri Jul 3 15:30:33 UTC 2009


OK, I just can't help myself.  Here's an even slicker way to write this 
using the Iif() function (though perhaps rather less readable):

Const LptDataPort as Integer = &H378  ' or 888 decimal
Const NoResponseEvent as Integer = &HFF  ' or 255 decimal
Const EventPulseDuration_ms as Integer = 20

' Send appropriate event pulse to PsychLab equipment...
WritePort LptDataPort, Iif( (Proposal.RT = 0), NoResponseEvent, 
Asc(Proposal.Resp) )
Sleep EventPulseDuration_ms
WritePort LptDataPort, 0

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