Issue sending triggers using Neurospec USB-parallel port adapter

Hey Brendan,

If it’s the case that you need to interact with the serial port rather than the parallel port, then I’m afraid i’m unable to help. If it’s an issue with the parallel port, then here’s some code that I’ve used successfully, although it’s with a 64 bit windows (but i think it’s comparable in principle…)

this snippet I had at the start of my experiment to initialise the parallel port

sendtriggers = False
#set parallel port params
if sendtriggers == True:
    IOport = parallel.setPortAddress(address = '0xD010') #change the address to whatever it is for the port on the comp in use
    holdvalue = 0 #reset the port to this after every trigger to avoid repeats, and reset all pins
    #IOport.setData(triggercode) # this is the code to send a trigger to the parallel port (i.e. to amplifier)
    #IOport.setData(holdvalue)   # always send a zero value to reset all pins after a trigger to prevent repeated sending

whenever I’ve then needed to send a trigger, i simply do this:

IOport.setData(trigger_value) #whatever trigger value I have
IOport.setData(holdvalue) #this is zero

Your problem could be arising because you aren’t setting a handler for your parallel port:
if the address of the port is right, maybe consider changing

parallel.setPortAddress(0x00000008)
to
your_port_name = parallel.setPortAddress(0x00000008)

then where you have parallel.setPin(2,1) change it to your_port_name.setPin(2,1)

Hopefully that may help - if not, then hopefully somebody else can step in with some 32bit specific advice!