The program idea is to read a data from dallas 1820 temperature sensor that
is connected to the PIN 10 (ACK) of LPT port.
All i want to do, is to use a simple, quick code that will read the pin 10.
All i have red about reading paraller ports is to use:
x=inb(STATUS); (for statusports)
Hey, but this is not all! I want to read a BYTES from pin 10, not a state of
ALL pins in statusport.
Please, tell me, how can i read ONE pin (for example pin nr. 10[ACK]), isnt
there any quick, simple method?
----- Original Message -----
From: "Blaise Gassend" <email@example.com>
To: "Pawel Stochlinski" <firstname.lastname@example.org>
Sent: Friday, December 20, 2002 12:46 AM
Subject: Re: [PARPORT] Reading from pin - help.
> > > Do something like
> > >
> > > int re;
> > >
> > > fd = open(portname,O_RDWR);
> > >
> > > ioctl(fd,PPRSTATUS,&res);
> > Yep, but when i read from file descriptor the soft is 'blocked' waiting
> > data.
> Perhaps your lpd currently has the parallel port open or something like
> > Isnt there anything easier? I just want to read from some pin a data,
> > not\hing more.
> Your code will be a lot more portable if you access the parallel port
> through high-level interfaces rather than through direct port access. As
> for which method is simpler, that is really up for grabs. You might
> actually considering using libieee1284 for maximum portability (accross
> kernel versions and so on).
> If you want help debugging your direct io version, tell us your whole
> program, what your experiment was, what the results were. Saying that
> you use inb and it doesn't work isn't enough for us to be able to help
> Blaise Gassend
-- To unsubscribe, send mail to: email@example.com --
-- with the single word "unsubscribe" in the body of the message. --
This archive was generated by hypermail 2b29 : Thu Dec 19 2002 - 18:58:13 EST