Newsgroups: comp.robotics
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornell!travelers.mail.cornell.edu!news.kei.com!news.mathworks.com!udel!gatech!howland.reston.ans.net!news.sprintlink.net!redstone.interpath.net!hilbert.dnai.com!nic.scruz.net!earth.armory.com!rstevew
From: rstevew@armory.com (Richard Steven Walz)
Subject: Re: Programmers Guide to Parallel Ports
Organization: The Armory
Date: Wed, 15 Feb 1995 09:07:26 GMT
Message-ID: <D41AoF.EE8@armory.com>
References: <3h6pk5$sbb@canopus.cc.umanitoba.ca>
                <BRENTB.95Feb14175919@epsudev1.waterloo.ncr.com>
Sender: news@armory.com (Usenet News)
Nntp-Posting-Host: deepthought.armory.com
Lines: 44

In article <BRENTB.95Feb14175919@epsudev1.waterloo.ncr.com>,
Brent Boghosian <brentb@epsudev1.Waterloo.NCR.Com> wrote:
>In article <3h6pk5$sbb@canopus.cc.umanitoba.ca> bgidzak@minet.gov.mb.ca
>(Bill Gidzak) writes:
>
>>   Is any on familliar with a book called the Programmer's Guide to
>>   Parallel Ports.
>>   Or If there is an informational chart explaining the wiring going to the
>>   printer from the LPT Port.  Not just the pin numbers on the port, but
>>   what each pin does and how the pins work together
--------------------------------
Actually all the pins represent is a latched one byte output port at 03BC,
0378, and 0278 for the respective three possible LPT ports, and then a 5-
bit input status port at those base addresses +1, and then the control port
which uses four open collector lines at the base addresses +2 for each LPT,
and the pins are simply the outputs of those ports or the inputs of the
status ports! That's ALL. No pin has ANY special function at all!! They
could all be redefined so as to totally rewire the "printer port" function
and it wouldn't make any difference, except you must use the status lines
for input only. There is a 5th internal only line on the control port which
enables the IRQ 7 for the port, but MS-DOS doesn't even use it! In addition
the open collector lines can be pulled up by setting them high and can be
read back with the IN or INP commands to see what's there or in the case of
connection to a device, it can be used to detect faults from the connected
printer or other device. All three ports can be read as well as the output
ports being written to. So the 4 open collector lines can be read if they
are first pulled high. BUT BE CAREFUL about this, as outputting 1's or FFH
blindly does NOT set all the pins to +5VDC or some TTL HI level! Some of
the lines undergo internal inversion on their way to the ports and the FAQ
tells you which one in its nice table. Zhahai Stewart did a marvelous job
creating and continuing to maintain this FAQ file as mentioned below:

>Don't know the book, however, Parallel Port FAQ is available from:
> ftp.armory.com  /pub/user/rstevew/ibmlpt.faq
>
>Drop me a request if you cannot access it.
>Brent Boghosian, AT&T-GIS       Brent.Boghosian@Waterloo.ATTGIS.com
>(519)884-1710 Ext.5719
--------------------------------
Also note the interesting and simple "tomlpt.faq" at that same ftp site of
mine! It takes you and leads you by the hand with examples of how to do it
all in BASIC, for goodness sake!;-)
-Steve Walz   rstevew@armory.com     ftp.armory.com /pub/user/rstevew/*

