Watching parallel port for a pin to go to ground?

Watching parallel port for a pin to go to ground?

Post by Matthew Delane » Sat, 31 Jul 1999 04:00:00



Is there any way to have my Linux box watch the parallel port and wait for a
pin to get shorted to ground (or another pin if that works better) and then
take an action? I'm hoping to find a way to do this with a simple BASH  if
statement, so I can execute a command based on it. I'm not C/C++ literate,
so I wouldn't be able to write a program using one of those to do it. It can
be any pin on the port, but it has to be the parallel port (I need all of my
serial ports). Basically, I want to be able to have a button, that when
pressed, will send an email (I know how to write the rest of the BASH
script, just not how to monitor the parallel port for that condition). I
guess there are 2 ways of doing this, either directly watching the status of
the port, or checking the error level of an external program that does this
already for some purpose.

Thanks!
Matt

 
 
 

1. How to watch Serial Port Pins for Events?

Hello,

I am trying to find out how to write a C program to watch a SparcClassic's
(Solaris 2.2) serial port for external events. All I need is to execute some
code based on a signal level change.

I am monitoring a power back-up unit and need to shutdown the machine
when a status line changes state.

Thanks for your help,

John MacFarlane

2. international keyboard by default

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

4. GS/EpsonStylusII: Can I talk to someone who has made this work?

5. Control ecpp parallel port on pin level

6. pcmcia drivers

7. Help. Data pins in parallel port not responding

8. Redhat 4.0 with Loadlin?

9. Interrupt for parallel port on 4 pins?

10. want to control and read pins on the parallel port individually

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

12. Pin outs for parallel port zip drive cable?

13. Setting pin on parallel port high