I am trying to send triggers via a parallel port using a new EEG system (BioSemi ActiveTwo). I have a Windows stimulus presentation machine that runs Psychopy. It has a parallel port that is connected to the EEG data collection computer via a parallel port cable. I have tried to send triggers using Psychopy code that has worked for me before on other systems, but it is not working now. I suspect the problem is not to do with Psychopy or Python, and may be something to do with device drivers. But I would like to ask for people’s opinion on the results of the following Psychopy code test that I did.
Using Standalone PsychoPy-2023.1.0 installed on Windows, in the Python console, I did the following:
from psychopy import parallel
parallel.setPortAddress(address=0x0378)
No error messages of any kind so far.
Then I did
parallel.setPin(3, 1)
which, I believe, sets pin 3 to a value of 1.
Then, I did
parallel.readPin(3)
and it returned 0.
I presume that indicates that everything is not working correctly and if it were, I would have obtained a value of 1 instead.
Trying something further, I did
parallel.setData(0)
which I believe sets all pins to 0.
Then I tried to read multiple pins as follows:
parallel.readPin(3) # returns 0
parallel.readPin(4) # returns 0
parallel.readPin(5) # returns 1
parallel.readPin(6) # returns 1
parallel.readPin(7) # returns 1
parallel.readPin(8) # returns 1
parallel.readPin(9) # returns 0
I presume that’s not what should have happened either if everything is working; I should have got 0 for all pins, I assume.
Then I did
parallel.setData(255)
which I believe sets all pins to 1. When I did the readPin tests as before, the same ones were 0 and 1, just like when I did parallel.setData(0), e.g. parallel.readPin(3) returns 0, parallel.readPin(5) returns 1, etc.
From all of this,I assume that this confirms that the parallel port, or the Python interface to it, is not working. Is that a correct assumption? In other words, if I were on a system that worked, i,e. where Psychopy could send triggers, and I did the above test, I assume that readPin would indicate the pins would values like all 0 or all 1. Unfortunately, I can’t do this test myself because I just have this one system to work with.