[visionegg] Re: parallel port: which pin?
- From: Christoph Lehmann <lehmann@xxxxxxxxxxxx>
- To: visionegg@xxxxxxxxxxxxx
- Date: Tue, 17 Dec 2002 14:06:43 +0100
thanks for the doc-hint
just because I use
input_value = 0
while (input_value <> 1):
input_value = raw_lpt_module.inp(0x379)
how do I specify here the pins? 0x379 is the port address, so what shall
I do with the bit4 = value & 0x10 ? I am too stupid....
thanks
chris
On Mon, 2002-12-16 at 18:42, Andrew Straw wrote:
> 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
> >
--
Christoph Lehmann
Department of Psychiatric Neurophysiology
University Hospital of Clinical Psychiatry
Waldau
CH-3000 Bern 60
Switzerland
Phone: ++41 31 930 93 83
Fax: ++41 31 930 96 61
Email: lehmann@xxxxxxxxxxxx
Web:
======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html
- References:
- [visionegg] Re: parallel port: which pin?
- From: Andrew Straw
Other related posts:
- » [visionegg] parallel port: which pin?
- » [visionegg] Re: parallel port: which pin?
- » [visionegg] Re: parallel port: which pin?
- » [visionegg] Re: parallel port: which pin?
- [visionegg] Re: parallel port: which pin?
- From: Andrew Straw