🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: sci.electronics
Article #5037

Re: Is PC parallel port latched?

#5037
From: Jeff DePolo
Date: Sat, 14 Jul 1990 06:36
50 lines
3163 bytes
In article <33965@ut-emx.UUCP> ycy@walt.cc.utexas.edu (Joseph Yip) writes:
>Hi,
>
>I am trying to use IBM PC's parallel port (printer port) as digital
>output port. This will save me from buying a digital I/O card.
>The printer port is an 8-bit output. I do not know if the output is
>latched or not. This means that if I send a character to the printer
>port, will the 8-bit lines stay the same. I 
>am thinking of using the parallel port to control a stepper motor. 

Good question.  About the best I can do is give you a wishy-washy 
answer.  I know that the parallel port is also capable of _receiving_
data.  If you've ever seen some of the parallel port file transfer
programs, you'll see that the parallel port is quite capable of bidirectional
communication.  To get the port to read data, all you do is have the 
sending computer write bytes out its parallel port, which then get latched
in the receiving computer's parallel port.  Then simply read the
contents of the parallel port on the receiving computer.  However, when
sending, I would guess that whether or not the data actually remains at
the port after it is received would depend on current drain on the port.
For example, if there was originally a 1 in bit 0 on the parallel port,
if the other end of the cable had a low Z with respect to ground, the 1
would become a 0.  I have a feeling that this would not be the case with
a normal serial port, as if it were the case, then every time a receiving
device (such as a printer) went to read the port, the 1's would often 
drop to 0's in the middle of the poll.  So, my guess is that it would
depend on the receiving device as to whether or not the data would
stay latched.

>
>If the parallel port is not latched, what is the easiest way to
>make it latch?

Get an octal latch connected to the 8 data lines with the latch-load line
connected to the strobe line.  When the strobe is set high, the contents
of the port will get stuck in the latch until the next byte is written.
Obviously this scheme won't prevent data overruns, however.  Depending
on your application, you may need some sort of buffering.

								--- Jeff




+-----------------------+-----------------------------------------------------+
| Jeff DePolo N3HBZ/AA  | Internet: depolo@eniac.seas.upenn.edu               |
| Univ. of Pennsylvania | RF: 146.685- 224.40- 442.70+ 144.455s (Philadelpia) |
| Computer Science Eng. | Twisted pair: (215) 386-7199 home                   |
|     Class of 1991     | Carrier pigeon: 420 South 42nd St. Philly, PA 19104 |
+-----------------------+-----------------------------------------------------+
Technical Details
Message-ID: <27096@netnews.upenn.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!netnews.upenn.edu!eniac.seas.upenn.edu!depolo
References: <33965@ut-emx.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!netnews.upenn.edu!eniac.seas.upenn.edu!depolo
From: depolo@eniac.seas.upenn.edu (Jeff DePolo)
Newsgroups: sci.electronics,comp.sys.ibm.pc
Subject: Re: Is PC parallel port latched?
Message-ID: <27096@netnews.upenn.edu>
Date: 14 Jul 90 06:36:57 GMT
References: <33965@ut-emx.UUCP>
Sender: news@netnews.upenn.edu
Reply-To: depolo@eniac.seas.upenn.edu.UUCP (Jeff DePolo)
Organization: University of Pennsylvania
Lines: 50