🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.msdos.programmer
Article #969

Programming the printer port to read in data.

#969
From: Santanu Lahiri
Date: Tue, 21 May 1991 20:20
29 lines
1818 bytes
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.

Here is the background.  This program will be used for some sort of 
theraputic training of a handicapped child.  She will cause the program
to play music notes by closing the switch - the computer plays the notes
as long as she keeps the switch closed.  The program is pretty much
ready, except for this one part.

I'd like to know if this is possible, i.e, the chip can be programmed
to read in such data, and if so, how.  I suspect I need to reprogram
some of the chips control registers.  For checking the switch status I
plan to do continuous polling within a loop.  Also, I do not know the 
exact hardware setup that is to be used, except that it's an IBM clone.

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.  

Thanks.

Santanu

-----------------------------------------
slahiri@magnus.acs.ohio-state.edu 
Technical Details
Message-ID: <1991May21.202043.24725@magnus.acs.ohio-state.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!slahiri

Show Full Headers
Complete Article Headers
Newsgroups: alt.msdos.programmer,comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!slahiri
From: slahiri@magnus.acs.ohio-state.edu (Santanu Lahiri)
Subject: Programming the printer port to read in data.
Message-ID: <1991May21.202043.24725@magnus.acs.ohio-state.edu>
Originator: slahiri@top.magnus.acs.ohio-state.edu
Sender: news@magnus.acs.ohio-state.edu
Nntp-Posting-Host: top.magnus.acs.ohio-state.edu
Organization: The Ohio State University
Distribution: usa
Date: Tue, 21 May 1991 20:20:43 GMT
Lines: 29