Xref: utzoo alt.msdos.programmer:2710 comp.os.msdos.programmer:5216 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!mips!apple!amdcad!sun!exodus!jethro!Sun.COM!acm From: acm@Sun.COM (Andrew MacRae) Newsgroups: alt.msdos.programmer,comp.os.msdos.programmer Subject: Re: Programming the printer port to read in data. Message-ID: <4144@jethro.Corp.Sun.COM> Date: 21 May 91 20:55:05 GMT References: <1991May21.202043.24725@magnus.acs.ohio-state.edu> Sender: news@jethro.Corp.Sun.COM Reply-To: acm@Sun.COM (Andrew MacRae) Followup-To: alt.msdos.programmer Distribution: usa Organization: Sun Microsystems, Mountain View CA Lines: 21 Cc: acm In article <1991May21.202043.24725@magnus.acs.ohio-state.edu>, slahiri@magnus.acs.ohio-state.edu (Santanu Lahiri) writes: > Hi folks, > > I am trying to write a program that can read a switch status - > switch is open or closed. The switch is an ordinary switch that I hope > to hook up to the printer port and use data line D0 and the Gnd line to > detect closure. [text deleted] > I'd appreciate any pointers you can give, or even alternate methods, > perhaps using the RS-232 ports. Any suggestion is welcome, as long as > hardware requirements are minimal. No doubt twenty-five others will respond with the same suggestion, but have you considered using the game port? There are lines there that indicate a button has been pressed. In fact you could use a modified joystick as your device and save a little trouble building one. Andrew MacRae