Hi,
I inherited a response box, replete with hand and foot-response pedals, but without a driver, and I'm keen to try and use it for a new study on an XP machine. It connects via a 25 pin parallel port, but as yet, I've not been able to get it working. I installed and, after a few tries, got the porttalk/lpwrite/lpread files compiled as per the excellent instructions in Andreas and Erik's original posts from mid last year (see msg #4851). Having problems reading data from the box though. In particular, I think I'm having difficulty finding the right port param for the lptread fx.
Function value = lptread(port)
% Arguments:
% port - double Port address (e.g., 889 = 0x1 + 0x378 for status register of LPT1
% on many machines, which corresponds to pins 10, 11, 12, 13, and 15 of a DB25
% parallel port -- note pin 11 is hardware inverted!)
%
% Examples:
% val = lptread(1+hex2dec(0x378));
%
% Author: Erik Flister, UCSD, 2006. Adapted from Andreas Widmann.
although 378 seems to be the correct resource signing for my parallel port (as per the eg code above), I get the same value returned regardless of which buttons are being pushed on the box. I'm also really not sure what the hex values are, or even which pins I should be reading from (was planning on trying to find this out via trial and error...)
Does anyone have any working example code they could send? Or ideas on what I might be having problems with? The box does work correctly on another machine, but with installed software and the original programmer long gone... Should also add that I have Matlab's DAQ toolbox, but wasn't having any luck reading a response from the parallel port with that either - again, sample scripts or knowhow would be much appreciated!
Many thanks.
Chris
I inherited a response box, replete with hand and foot-response pedals, but without a driver, and I'm keen to try and use it for a new study on an XP machine. It connects via a 25 pin parallel port, but as yet, I've not been able to get it working. I installed and, after a few tries, got the porttalk/lpwrite/lpread files compiled as per the excellent instructions in Andreas and Erik's original posts from mid last year (see msg #4851). Having problems reading data from the box though. In particular, I think I'm having difficulty finding the right port param for the lptread fx.
Function value = lptread(port)
% Arguments:
% port - double Port address (e.g., 889 = 0x1 + 0x378 for status register of LPT1
% on many machines, which corresponds to pins 10, 11, 12, 13, and 15 of a DB25
% parallel port -- note pin 11 is hardware inverted!)
%
% Examples:
% val = lptread(1+hex2dec(0x378));
%
% Author: Erik Flister, UCSD, 2006. Adapted from Andreas Widmann.
although 378 seems to be the correct resource signing for my parallel port (as per the eg code above), I get the same value returned regardless of which buttons are being pushed on the box. I'm also really not sure what the hex values are, or even which pins I should be reading from (was planning on trying to find this out via trial and error...)
Does anyone have any working example code they could send? Or ideas on what I might be having problems with? The box does work correctly on another machine, but with installed software and the original programmer long gone... Should also add that I have Matlab's DAQ toolbox, but wasn't having any luck reading a response from the parallel port with that either - again, sample scripts or knowhow would be much appreciated!
Many thanks.
Chris