Millisecond Forums

Parallel Port time accuracy

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

By Tacho - 7/16/2015

I try to set a data pin of the parallel port for just 1 millisecond to high. Therefore i write the following skript and it runs, but i dont think, that the datapin is realy for just 1 millisecond on high... I contol the LEDs of a monitor to present a picture for just 1 millisecond. So the picture is loadedbefore and i turn the light on for 1 millisecond. But i can still identify the picture and in theory that should not be possible because it should be too short (subliminal perception). 

<defaults>
/screencolor = (0,0,0)
</defaults>

<picture Bilder>
/ items = ("Fruit_blackbackground.jpg", "Burger_bb.jpg", "Eg_bb.jpg")
/ position = (50, 50)
</picture>

<trial licht>
/ stimulustimes = [1000 = mysignal; 2000 = Bilder; 3008 = mysignal2; 3009 = mysignal]
/ trialduration = 4000
</trial>

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

<port mysignal2>
/ port = lpt1
/ subport = data
/ items = ("00000100")
</port>

<block Esgibtnurein>
/ trials = [1-6 = noreplace(licht)]
/ stop = [block.Esgibtnurein.trialcount >= 6]
</block>
By Dave - 7/17/2015

You cannot display a picture (or other visual stimulus) for 1 millisecond. That's not how displays work. The minimum display duration for any given stimulus is a single display frame (and even that is a simplification; see http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0012792 and http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0044048 for the gritty details) -- if your display runs at a 100 Hz refresh rate, that duration is 10 ms. If the display runs at a lower refresh rate, the duration is longer (approx. 16.7 ms for 60 Hz, 20 ms for 50 Hz). Only a display running at 1000 Hz would allow for 1 ms display durations -- and to the best of my knowledge such displays do not exist.

If you want to measure the temporal characteristics of the parallel port on your system, visual stimuli do not help you -- they are unsuitable. Instead, you need to conduct measurements using a multimeter, oscilloscope or other suitable device attached to the port.
By Dave - 7/17/2015

Some additional thoughts:

(1) Even if you somehow control the LED monitor's backlighting to only turn it on for a brief period of time, it's not guaranteed that the circuitry built into the monitor is able to react / process your request quickly enough (turn light on and off again within a single millisecond).

(2) While parallel ports usually have relatively quick response times, they can vary from system to system (different chips, different circuitry, faster or slower drivers on the software side of things, etc.). There *is* variability and measurement error involved and changing the status of a ping within a single millisecond is enormously challenging given all the various moving parts involved. I am doubtful this can be made to work on any general purpose platform; in addition it is unclear whether the *receiving* equipment would be able to reliably detect such a short status change. Maybe when using specially built, embedded hardware, but I'm skeptical about the feasibility using standard components. (And if you look at the literature making use of parallel port signals to assess timing characteristics of various peripherals, you'll encounter *much* longer durations -- 50 ms and above; cf. e.g. http://link.springer.com/article/10.3758%2FBRM.41.3.598 .)

Hope this helps.