> Well as i just said, i just want to read a data from specified pin. For
> example i want to read a data from PIN 10 on lpt port.
> How to do it?
> inb(STATUS) - doesnt do what i expect, of course when i connect some device
> to ground and pin 10 it will show me the numerical status of a PIN, but i
> cant still imagine how to read data from that pin :((
So here is my understanding:
* you want to connect some sensor that outputs 0V or 5V to pin 10 of
your parallel port so that software can tell the state of the sensor.
* currently, you are doing inb(STATUS) and looking at bit 6 which
corresponds to pin 10. That bit should be 0 when your sensor is at 5V
and 1 when the sensor is at 0V.
In theory this works (and I have done it many times), what part isn't
worknig for you. In particular, what do you mean by the "numerical status
of a pin", and do you mean something more than what I have described by "read
data from that pin"?
You might also want to have a look at some parallel port FAQs such as
http://www.lvr.com/files/ibmlpt.txt
Blaise Gassend
> help please...
>
>
> ----- Original Message -----
> From: "Blaise Gassend" <blaise@gassend.com>
> To: "Pawel Stochlinski" <int01h@sentinel.mj12.eu.org>
> Cc: <linux-parport@torque.net>
> Sent: Wednesday, December 18, 2002 10:55 PM
> Subject: Re: [PARPORT] Reading from pin - help.
>
>
> > (Sorry about that previous message. I had pgp do some strange things on
> > me.)
> >
> > You should tell us exactly what you are doing (both in the code, and
> > physically) as your experiment, what the results are, and why you think
> > that is incorrect. Saying "is not correct doesn't really help us see
> > your problem.
> >
> > Blaise Gassend
> >
> > Quoted from Pawel Stochlinski on Wed, Dec 18, 2002 at 09:39:00PM +0100.
> > > Please help me - i have a problem with reading a data from pin #10 on
> LPT
> > > (its an ACK), what should i write in code, to read it?
> > > I am using
> > > x=inb(STATUSPORT);
> > > but that is not correct, please, help me how to read from pin 10...
> > >
> > > regards..
> > >
> > >
> > >
> > > "Ulubiency bogow umieraja mlodo ale pozniej zyja wiecznie w ich
> > > towarzystwie" [Fryderyk Nietzsche]
> > >
> ____________________________________________________________________________
> > > __
> > > Pawel Stochlinski (int01h)
> > > Linux registered user: #246375
> > > (http://sentinel.mj12.eu.org||http://ipe.ath.cx)
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: "Tim Waugh" <twaugh@redhat.com>
> > > To: "Nate" <nate@uniwest.com>
> > > Cc: <linux-parport@torque.net>
> > > Sent: Wednesday, December 18, 2002 12:36 AM
> > > Subject: Re: [PARPORT] LPGETSTATUS
> > >
> > >
> > >
> > >
> > > -- To unsubscribe, send mail to: linux-parport-request@torque.net --
> > > -- with the single word "unsubscribe" in the body of the message. --
> > >
> >
> > -- To unsubscribe, send mail to: linux-parport-request@torque.net --
> > -- with the single word "unsubscribe" in the body of the message. --
>
>
>
> -- To unsubscribe, send mail to: linux-parport-request@torque.net --
> -- with the single word "unsubscribe" in the body of the message. --
>
-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --
This archive was generated by hypermail 2b29 : Thu Dec 19 2002 - 18:56:02 EST