Application Note: 001

Using a printer port to drive the RPC

Date: 22 - January 1998
Date: 27 May 1998 (updated)

Graham Sharples
Sabananthan Paramananthan

METHOD 1 , BI-DIRECTIONAL PORT (PS/2)
Port requirement - 8 bit bi-directional (PS/2 or ECP set to PS/2 Mode / Byte Mode)
Connections - RPC 25 WAY 'D' printer


RPC pin   PC (Printer Port) pins
Pin Labels pin   PS/2 pins   Pin Labels
GND 1
18 to 25   Ground
D0 2 2   Data 0
D1 3 3   Data 1
D2 4 4   Data 2
D3 5 5   Data 3
TXR 6 1   -Strobe
TXA 7 12   +Paper Out
RXR 8 13   +Printer Selected
RXA 9 14   -Auto Linefeed
RES 10 16   -Initialise Printer
5 volt 11 +5V supply    
GND 12 0V supply    
+ve interrupt   10   -Acknowledge
PC printer port registers (addresses given for base address of 0378)
0378 data reg b7 b6 b5 b4 b3 b2 b1 b0
    - - - - D3 D2 D1 D0
 
0379 status reg b7 b6 b5 b4 b3 b2 b1 b0
    - int TXA RXR - - - -
 
037A control reg b7 b6 b5 b4 b3 b2 b1 b0
    - - dir Ien - RES RXA TXR
For Extended Capabilities Port (ECP) only
077A Extended Control Register (ECR) b7 b6 b5 b4 b3 b2 b1 b0
    0 0 1 - - - - -

Printer Port can be configured to operate in ECP mode by changing the Printer Port setting in BIOS from SPP or EPP to ECP. Press DEL key for AWARD BIOS or F1 for AMI BIOS when booting the computer. Then go to Integrated Peripherals section to change the settings for Parallel Port. However, it may be necessary to change it back to SPP or EPP mode for some printers to operate properly.


int - +ve transition interupt bit, see "interupt drive"
Ien - bit is internal interupt enable, not used if polling used
1 = interupt enable , 0 = disabled (polled operation)
dir - bit is internal, controls direction of data output / input
0 = data pins are O/P's, ie drive data to RPC
1 = data pins are I/P's, ie read data from RPC
note - RXA and TXR pins are inverted drives from the register
ie a 1 in the control register gives a 0 on the pin
all other registers / bits are true.

METHOD 2 , STANDARD PRINTER PORT (SPP)
Port requirement Standard Printer Port (SPP) with Open Collector / Pull-up Control lines
Connections - RPC 25 WAY 'D' printer
RPC pin   PC (Printer Port) pins
Pin Labels pin   Pin   Pin Labels
GND 1
18 to 25   Ground
D0 2 1   -Strobe
D1 3 14   -Auto Linefeed
D2 4 16   -Initialise Printer
D3 5 2   -Select Printer
TXR 6 1   Data 0
TXA 7 12   Paper Out
RXR 8 13   Printer Selected
RXA 9 3   Data 1
RES 10 4   Data 2
5 volt 11 +5V supply    
GND 12 0V supply    
+ve interrupt   10   -Acknowledge

PC printer port registers (addresses given for base address of 0378)
0378 data reg b7 b6 b5 b4 b3 b2 b1 b0
    - - - - - RES RXA TXR
 
0379 status reg b7 b6 b5 b4 b3 b2 b1 b0
    - Int TXA RXR - - - -
 
037A control reg b7 b6 b5 b4 b3 b2 b1 b0
    - - dir Ien D3 D2 D1 D0


(B'00000100'= QUIECENT I/P) ( ie. 1111 on data lines )

int - +ve transition interupt bit, see "interupt drive"
Ien - bit is internal interupt enable, not used if polling used
1 = interupt enable , 0 = disabled (polled operation)
note - D0, D1 and D3 pins are inverted drives from the register
ie a 1 in the control register gives a 0 on the pin
all other registers / bits are true.

RPC Dev Kit comes with a DB25 Plug (Male Connector) for Standard Parallel Port with Open Collector / pull -up control lines. To use the RPC Dev Kit in PS/2 Mode, a special pair of interface cables are also provided.
Internet sources of further information
Interfacing the IBM PC Parallel Printer Port.
Overview
This document is called an FAQ because it answers many commonly asked questions about the IBM parallel port, but it is formatted more as a brief tutorial. Read it twice before asking for more info; some stuff comes late.
ftp://ftp.rmii.com/pub2/hisys/parport
http://www.rmii.com/~hisys/parport.html

==== Version 0.96 9/1/94----- Zhahai Stewart----- zstewart@hisys.com
Here are some useful links for detailed information on Parallel Port Interface.

ftp://ftp.armory.com/pub/user/rstevew/LPT
Use of a PC Printer Port for Control and Data Acquisition
Kris Heidenstrom's PC Parallel Port Mini-FAQ Release 10
Interfacing to the IBM-PC Parallel Printer Port
Interfacing the Parallel Port
Craig Peacock's Interfacing the PC.
Parallel.Exe, v1.34
Parallel Port Information Utility
(C) Copyright 1993 Jay Lowe
Parallel Technologies, Inc
PO Box 7
Redmond, WA 98073-0007
This program may be used free of charge subject to the Restricted License Agreement as stated below Lab 206-869-1136
Fax 206-869-9767
Compuserve 76640,203
Internet 76640.203@COMPUSERVE.COM
If you have any technical inquires please contact our technical support team at tech_support@radiometrix.eu.com .