plp(7)

plp - parallel line printer interface

As shipped in IRIX 6.5. First release of IRIX 6.5.

NAME
     plp - parallel line printer interface

SYNOPSIS
     #include <sys/plp.h>
     /dev/plp
     /dev/plpbi

DESCRIPTION
     The special files refer to the parallel printer interface on the Indigo,
     Indy, Indigo2, Challenge/Onyx, O2, OCTANE, Origin200, and Onyx2 products.

     The plp device supports output to a Centronics-compatible printer
     connected to the builtin parallel printer port.  Normally, /dev/plp is
     directly accessed only by a print spooling mechanism such as the lp(1)
     subsystem.  The special file /dev/plp may only be open for writing by one
     process at a time.  However, several processes may open the device read-
     only so as to obtain printer status.  A printer reset signal is issued
     whenever the device is opened for writing.

     The plp device supports the Centronics interfaces.  The Indigo, Indigo2,
     and Indy also support bidirectional (input) Centronics interfaces.  The
     plp devices on the O2, OCTANE, Origin200, and Onyx2 are IEEE 1284-II
     compliant devices.  The plp device driver on the O2 supports all three
     IEEE 1284-II interfaces: Compatibility(Centronics), bidirectional
     Enhanced Parallel Port(EPP), and bidirectional Extended Capabilities
     Port(ECP) while the drivers on the OCTANE, Origin200, and Onyx2 support
     only Centronics and ECP output mode.

     Normally, /dev/plp and /dev/plpbi are directly accessed only by a print
     spooling mechanism such as the lp(1) subsystem.  Any number of processes
     may open the device for reading or writing, but these processes must
     synchronize reads and writes to prevent intermingled data.  A printer
     reset is automatically issued only once at system startup.  Also the
     special file /dev/plpbi may be open for reading and writing by one
     process at a time.  The plp device on the O2 can be accessed by multiple
     processes (the printer and the parallel floppy drive) with different
     protocol interfaces (Centronics, ECP, or EPP) for read and write.

     For backward compatibility, the default mode of /dev/plp is set to
     Compatibility(Centronics) mode although the plp device driver on the O2
     can do auto-negotiation with printers (peripherals) to set up the proper
     protocol.  On the O2, the default mode can be overwritten through
     /var/sysgen/master.d/ecplp and the default mode of the special file
     /dev/plpbi is set to ECP mode.  On the OCTANE, Origin200, and Onyx2 the
     default mode can only be changed to ECP output mode through ioctl
     PLPIOMODE.

     The following ioctls are defined in the include file <sys/plp.h> and may
     be used to control the device:

     PLPIOCSTATUS   Returns the current printer status.

     PLPIOCRESET    Cancels any current printing and asserts the reset signal
                    to the printer.

     PLPIOCSTROBE   Sets the duration and duty cycle of the data strobe
                    output. A macro is provided, PLP_STROBE, which converts
                    strobe length to the argument format.  See <sys/plp.h>.
                    Does not apply to O2, OCTANE, Origin200, and Onyx2.  Not
                    all possible settings will work, and some devices will not
                    work with any but the standard settings.

     PLPIOCESTROBE  Sets the set-up, pulse, and hold times of the data strobe
                    output. A macro is provided, PLP_ESTROBE, which converts
                    strobe length to the argument format.  See <sys/plp.h>.
                    Challenge/Onyx L/XL only.  Not all possible settings will
                    work, and some devices will not work with any but the
                    standard settings.

     PLPIOCIGNACK   Argument of 1 causes the acknowledge input from the
                    interface to be ignored.  Argument of 0 reenables the
                    acknowledge input.  Only applies to R4000 Indigo, Indy,
                    and Indigo2 systems.

     PLPIOCWTO      Set write timeout value, the length of time a write
                    command will wait before timing out, in seconds (default
                    is 60 seconds).

     PLPIOCRTO      Set read timeout value, the length of time a read command
                    will wait before timing out, in seconds.  All writes are
                    immediately followed by reads therefore note that this
                    value directly affects each write.

     PLPIOCREAD     Enables the reads from the port (bidirectional mode). For
                    all Indy and Indigo2 products PLPIOMODE ioctl is a
                    prerequisite. Should only be set once at the time the
                    device is opened. Use the following code to set it (it
                    remains set until the port is closed).

                         ....
                        if (ioctl (scanner, PLPIOCREAD, 1) < 0) {
                            close (scanner);
                            return -1;
                        }
                         ....
                    For the O2 product, PLPIOCREAD ioctl is valid only in ECP
                    or EPP mode.

     PLPIOMODE      This ioctl is supported for all Indy, Indigo2, O2, OCTANE,
                    Origin200, and Onyx2 products.  It causes the driver to
                    set the controller for bidirectional IO and should only be
                    set once at initialization time. Use the following code to
                    set it:

                         ....
                          if (ioctl (scanner, PLPIOMODE, PLP_BI) < 0) {
                            close (scanner);
                            return -1;
                          }
                         ....

                    For the O2 product, use PLP_ECP or PLP_EPP for
                    bidirectional IO and PLP_CMPTBL for Centronics output
                    mode.

                    For the OCTANE, Origin200, and Onyx2 products, this ioctl
                    can only set Centronics mode and ECP output mode.

     PLPIOCSTATUS   This ioctl returns the printer status as an integer bit-
                    mask based on constants defined in <sys/plp.h>.  The
                    constants are described below:

                         FAULT     Printer is in fault state
                         EOI       End of Ink (Ribbon out)
                         EOP       End of Paper
                         ONLINE    Printer is on line

                    Not all printers support all of these status indications.
                    For O2 and OCTANE products, FAULT, EOI, and EOP are valid
                    only in Compatibility mode.

FILES
     /dev/plp, /dev/plpbi

NOTE
     On O2, OCTANE, Origin200 and Onyx2 /dev/plp[n] are linked to
     /hw/parallel/plp[n].  On driver unregistration and subsequent re-
     registration, the /hw/parallel entries may no longer exist. Use the
     commands

               cd /dev; ioconfig -f /hw

     to re-create these entries.

SEE ALSO
     lp(1), lpr(1)

ELECTRICAL INTERFACE
     IEEE 1284-A 25-pin subminiature D-shell (standard DB-25) connector at the
     host or the peripheral end.

                    IEEE 1284-A 25-PIN PARALLEL PORT CONNECTOR
              ______________________________________________________

               PIN     SIGNAL     DESCRIPTION
              ______________________________________________________

                1      nStrobe    Strobe Data
                2       Data1     Data Bit 0
                3       Data2     Data Bit 1
                4       Data3     Data Bit 2
                5       Data4     Data Bit 3
                6       Data5     Data Bit 4
                7       Data6     Data Bit 5
                8       Data7     Data Bit 6
                9       Data8     Data Bit 7
               10       nAck      Acknowledge
               11       Busy      Peripheral Busy
               12      PError     Page Error
               13      Select     Peripheral Online
               14      nAutoFd    Automatic Line Feed (or PR/SC)
               15      nFault     Peripheral Fault
               16       nInit     Peripheral Reset
               17     nSelectIn   Turn Peripheral Online (or No Ink)
              18-25      Gnd      Signal Ground
                    |



















                                |





















     IEEE 1284-B 36-pin (normal Centronics) connector at the peripheral end.

                    IEEE 1284-B 36-PIN PARALLEL PORT CONNECTOR
                ___________________________________________________

                 PIN     SIGNAL     DESCRIPTION
                ___________________________________________________

                  1      nStrobe    Strobe Data
                  2       Data1     Data Bit 0
                  3       Data2     Data Bit 1
                  4       Data3     Data Bit 2
                  5       Data4     Data Bit 3
                  6       Data5     Data Bit 4
                  7       Data6     Data Bit 5
                  8       Data7     Data Bit 6
                  9       Data8     Data Bit 7
                 10       nAck      Acknowledge
                 11       Busy      Peripheral Busy
                 12      PError     Page Error
                 13      Select     Peripheral Online
                 14      nAutoFd    Automatic Line Feed (or PR/SC)
                 15         -       Not Defined (or No Paper)
                      |
















                                  |

                 16        Gnd      Logic Ground
                 17        Gnd      Chassis Ground (or No Ink)
                 18      PrnHigh    Peripheral Logic High (or N.C.)
                19-30      Gnd      Signal Ground
                 31       nInit     Peripheral Reset
                 32      nFault     Peripheral Fault
                33-35       -       Not Defined
                 36     nSelectIn   Turn Peripheral Online
                      |





                                  |








     IEEE 1284-C 36-pin miniature connector at the host or the peripheral end.

                    IEEE 1284-C 36-PIN PARALLEL PORT CONNECTOR
                    __________________________________________

                     PIN     SIGNAL     DESCRIPTION
                    __________________________________________

                      1       Busy      Peripheral Busy
                      2      Select     Peripheral Online
                      3       nAck      Acknowledge
                      4      nFault     Peripheral Fault
                      5      PError     Page Error
                      6       Data1     Data Bit 0
                      7       Data2     Data Bit 1
                      8       Data3     Data Bit 2
                      9       Data4     Data Bit 3
                     10       Data5     Data Bit 4
                     11       Data6     Data Bit 5
                     12       Data7     Data Bit 6
                     13       Data8     Data Bit 7
                     14       nInit     Peripheral Reset
                     15      nStrobe    Strobe Data
                     16     nSelectIn   Turn Peripheral Online
                     17      nAutoFd    Automatic Line Feed
                     18     HostHigh    Host Logic High
                    19-35      Gnd      Signal Ground
                     36      PrnHigh    Peripheral Logic High
                          |





















                                      |