Newsgroups: comp.robotics
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!uunet!eskimo!chubbard
From: chubbard@eskimo.com (Charles Hubbard)
Subject: Re: Parallel port interfacing?
X-Nntp-Posting-Host: eskimo.com
Message-ID: <D4ME20.HGv@eskimo.com>
Sender: usenet@eskimo.com (News User Id)
Organization: Eskimo North (206) For-Ever
References: <D45GLG.CpI@lut.ac.uk> <1995Feb23.160432.24061@njitgw.njit.edu>
Date: Sun, 26 Feb 1995 18:29:59 GMT
Lines: 32

In article <1995Feb23.160432.24061@njitgw.njit.edu>,
Rolan <rxy5310@hertz.njit.edu> wrote:
>Though I've been warned against doing it, I've interfaced 8-bit
>signals into the P-port through the data lines. This is how it 
>worked:
>
>I wired an NPN transistor between the data pin and the P-port ground.
>Collector to Data pin (pins 1-9) and emitter to ground (pines 18-25).
> You can do it with all 8 data lines.
>The your digital signal will go the base of the transistor.

...(stuff deleted)...

>NOTE: I would suggest you go out and by a really CHEAP $7 p-port card
>and use that rather than using the one that comes with your
>2 COM ports Drive controller and game ports.


We used to do a similar thing only we left out the transistors (which you 
can do if your signal lines can sink enough current).  It is a dangerous 
thing to do though and is also usually unecessary since most newer 
parallel ports are truely bidirectional (typically select the direction 
using bit 5 in the control register -- 0x37A for LPT1).  Even a regular 
old dedicated output parallel port has five status inputs which can be 
used.  I would recommend against your method unless it was absolutely 
necessary.

I am including in a separate post a copy of the Parallel Port FAQ which 
addresses these issues and many others.


Charlie Hubbard
