Subject: Re: Line disciplines on parallel ports
To: None <tech-kern@NetBSD.ORG>
From: None <is@beverly.rhein.de>
List: tech-kern
Date: 07/31/1995 08:27:07
Martin Husemann (martin@laurin.teuto.de) wrote:
: How to treat "things hanging off a parallel port"
: =================================================
: 
: A short discussion on current-users some time ago initiated the idea to
: treat different things hanging off a parallel port in some uniform way.
: Chris suggested to think of it as line disciplines for ttys.
: ...


: What is a parallel port?
: ------------------------
: 
: Here I'm talking about parallel ports designed to connect printers.
: Many architectures NetBSD runs on have such a device, probably the
: most common version has a 25 pin female D-connector and are connected
: to a cable ending in a Centronics connector at the printer's side.
: 
: There are several kind of devices you can plug into such a port (maybe
: through some kind of cabling):
: 
:  - printers
:  - PLIP cable (kind of a null-modem cable for parallel ports)
:  - pocket ethernet adaptors
:  - SCSI adaptors
: 
: Unfortunately, as the parallel port originaly was designed as a unidirectional
: device, all these devices use incompatible ways to transfer bytes. This makes
: things a bit more complicated than the serial ports, where line disciplines
: all use the same (hardware dependend) input/output routines and just decide
: what bytes to transfer.

...

: The hardware layer
: ------------------
: 
: If I don't miss something obvious, a parallel port can be abstracted into:
: 
:  (1) 8 bits output D0 - D7
:  (2) (only on some "bidirectional" hardware) 8 bits input D0 - D7
This applies, sort of, to Amiga hardware, too: the output pins can be
switched to input.
:  (3) 4 bits output (STROBE, AUTOLF, INIT, SELECT)

The STROBE pin on the Amiga parallel port is automatically set active
when data is written to the output register, and can only be cleared at
will. 

:  (4) 4 bits input (ERROR, SELECT, PAPEROUT, BUSY)
I think the ERROR is missing on the Amiga.

:  (5) 1 special bit input (ACK) which can be tied to an interrupt
: 

Regards,
	Ignatios Souvatzis