[visionegg] Re: parallel port: which pin?

Hi Christoph,

I'm glad the mouse is now working.

From the VisionEgg.DaqLPT.LPTInput.get_data() documentation:

Get status bits 0-7 of the LPT port.
 
The status bits were not really meant for data input
Nevertheless, for sampling one or two digital inputs, they
work fine.
 
Bits 4 and 5 (pins 13 and 12, respectively) should be first
choice to sample a digital voltage.  The other bits have some
oddities. Bits 0 and 1 are designated reserved. Others are
"active low"; they show a logic 0 when +5v is applied.
 
bit4 = value & 0x10
bit5 = value & 0x20

Cheers!
Andrew

On Monday, December 16, 2002, at 09:00 AM, Christoph Lehmann wrote:

ok. I now try to make stimulus presentation dependent on whether a
streched TTL pulse (ca. 30ms length) has arrived on the parallel port or
not:

see last while loop in the function:

so: WHICH PIN do I have to put the pulse to?

thanks, Christoph
-------------------------------------------------

def image_selector( t ):
global last_image, start_time, timestamp, last_timestamp,
first_stim_flag, log
time.sleep(0.0001) #purposefully yield the
processor, so that during max priority mode, mouse can be tracked
i = int(t/duration_per_image)
if first_stim_flag == 1:
start_time = VisionEgg.timing_func()
timestamp = start_time
log = (timestamp - start_time, photoX[i], -1, -1) #create next
new log
first_stim_flag = 0
elif i <> last_image:
log_list.append(log) #append last log
timestamp = VisionEgg.timing_func()
log = (timestamp - start_time, photoX[i], -1, -1) #create next
new log
last_image = i
# poll the LPT for the TTL trigger, sent by the MR scanner
input_value = 0
while (input_value <> 1):
input_value = raw_lpt_module.inp(0x379)
return [ preloaded_stimulus_list[i] ]



======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

Other related posts: