serial port wiring, switch?

C

Carl

Hello,

Can anyone offer any experiences on wiring a switch to a serial port?
What I intend to do is wire a switch to a serial port, and have a daemon
program periodically test the status (open/closed) of the switch.

Any advice on wiring appreciated.
Carl.
 
G

Gerard Bok

Can anyone offer any experiences on wiring a switch to a serial port?
What I intend to do is wire a switch to a serial port, and have a daemon
program periodically test the status (open/closed) of the switch.

It is quite possible.
But why not use the gameport ?
Has it's own switch detectors :)

You can read the status of any of the switches in Basic or any
other language.

If you use the serial port you may run into several pitfalls:
- power management switching of the port all together
- you need some software to read the switch status
- you may need to debounce your reading
- Windows doesn't easily accomodate direct manipulation of
hardware
etc,
 
C

Carl

Gerard said:
It is quite possible.
But why not use the gameport ?
Has it's own switch detectors :)

You can read the status of any of the switches in Basic or any
other language.

If you use the serial port you may run into several pitfalls:
- power management switching of the port all together
- you need some software to read the switch status
- you may need to debounce your reading
- Windows doesn't easily accomodate direct manipulation of
hardware
etc,


Thanks for the tip.
In my reading, I did just discover the game port, and do believe that is
what I will be using.

Thanks again.
Carl.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top