want to control and read pins on the parallel port individually

want to control and read pins on the parallel port individually

Post by Alex Shr » Thu, 20 Jul 1995 04:00:00

I posted this before, but I didn't see any responses, so I thought I'd
repost and update my progress.

First, I would like to use the parallel port as an interface to some
circuits.  This means I will need to control and read the pins on the
parallel port individually.  

Using the LPG and the IO mini-FAQ, I came up with the following:

  if(ioperm(LP_B(1)+1,1,1)<0) { printf("error opening /dev/lp1\n"); return 1; }



This prints some interesting things based on the status of the
printer, but I have no idea what they mean (I could look them up in
<linux/lp.h>, but that wouldn't do any good, because I don't know
which pins' being high the literal meaning corresponds to).

Does anyone know how to address the individual pins with inb and outb?
Feel free to correct anything in the above code, too.


           http://ajshrom.student.princeton.edu |             Linux ...


1. Control ecpp parallel port on pin level

Hi All,
I'm looking for a script of software which let me control the parallel port
on pin level. I have a hardware circuit connected on my parallel port with
LED's to see with data channel is up. I have it working on Linux, but the
software (library) is not available on Solaris. The reason for this is, is a
solution to get 8 hardware pins with can be controlled by software to
control relais.

With kind regards,

Arjan van 't Hof

2. HELP! RPC/XDR decoding problem.

3. have C code for parallel i/o, pin by pin (for interfacing)

4. Relay daemon

5. Help. Data pins in parallel port not responding

6. How do you get Sparc Linux & Netscape set up??

7. Interrupt for parallel port on 4 pins?

8. Getting simple PPP connection

9. Parallel port programming... pins 12 and 13 not working

10. Pin outs for parallel port zip drive cable?

11. Setting pin on parallel port high

12. parallel port: why +5V on pin 12 in rest

13. Watching parallel port for a pin to go to ground?