Path: utzoo!attcan!uunet!tektronix!reed!psu-cs!warren From: warren@psu-cs.UUCP (Warren Harrison) Newsgroups: comp.sys.ibm.pc Subject: Re: Re: Using the printer port for input Message-ID: <1502@psu-cs.UUCP> Date: 14 Jan 89 06:17:58 GMT References: <704@krafla.rhi.hi.is> <816@ttrde.UUCP> Organization: Dept. of Computer Science, Portland State University; Portland OR Lines: 47 > In article <704@krafla.rhi.hi.is>, frisk@rhi.hi.is (Fridrik Skulason) writes: > > I need to connect a set of eight switches to my PC. The most simple way > > to do it seems to be connecting them to the parallel port, and using it > > as input port instead of output. > > > > My question is: Does anyone have a code fragment (in C, assembler or > > whatever) for changing the port into an input port? > > Sorry, the standard PC parallel port hardware is not capable of being > used as an input port no matter how clever your code is. > > There was an article a few months ago in Steve Ciarcia's "Circuit Cellar > INK" magazine on a simple hardware modification to correct this > problem. It requires cutting a trace, adding a wire, and is pretty > simple if you are good at tracing out paths on a circuit board. > > -- > Peter Fales AT&T, Room 2F-217 > 200 Park Plaza > UUCP: ...att!ttrde!pfales Naperville, IL 60566 > Domain: pfales@ttrde.att.com work: (312) 416-5357 It would seem this is the case, and I would believe it, except many of the laptop to desktop data transfer utilities use the parallel port to transfer data (ie, one parallel port sends it and one receives it). For example, my copy of "The Interchange" (SMT, Inc.) includes a cable which you connect to the parallel ports of the laptop and the desktop to transfer files (in the event you don't have a 3.5" disk on the desktop). This results in *VERY* fast data transfer (obviously faster than is possible with a serial line). The product specs do not mention anything about hardware modifications, and it seems to work OK on my Amstrad laptop and my 286 clone (which are about as plain vanilla as you can get). This leads me to believe that in fact you can use the parallel port as an I/O device (albeit, the cable can't be more than 10' long) if you know what you're doing and are willing to write the appropriate software. Warren -- ------------------------------------------------------------------------------- Warren Harrison CSNET: warren@pdx.edu Department of Computer Science UUCP: {ucbvax,decvax}!tektronix!psu-cs!warren Portland State University Internet: warren%pdx.edu@relay.cs.net Portland, OR 97207-0751