computer interfacing tutorial-printer, serial, game, usb port
 

 

PREVIOUS NEXT

 

Table 1. Printer Port Pin Configuration

Pin No
(D-Type 25)
Pin No (Centronics)
SPP Signal
Direction In/out
Register
Hardware Inverted
1
1
nStrobe
In/Out
Control
Yes
2
2
Data 0
Out
Data
 
3
3
Data 1
Out
Data
 
4
4
Data 2
Out
Data
 
5
5
Data 3
Out
Data
 
6
6
Data 4
Out
Data
 
7
7
Data 5
Out
Data
 
8
8
Data 6
Out
Data
 
9
9
Data 7
Out
Data
 
10
10
nAck
In
Status
 
11
11
Busy
In
Status
Yes
12
12
Paper-Out / Paper-End
In
Status
 
13
13
Select
In
Status
 
14
14
nAuto-Linefeed
In/Out
Control
Yes
15
32
nError / nFault
In
Status
 
16
31
nInitialize
In/Out
Control
 
17
36
nSelect-Printer / nSelect-In
In/Out
Control
Yes
18 - 25
19-30
Ground
Gnd
 
 

 The above table uses "n" in front of the signal name to denote that the signal is active low. e.g. nError. If the printer has occurred an error then this line is low. This line normally is high, should the printer be functioning correctly. The "Hardware Inverted" means the signal is inverted by the Parallel card's hardware. Such an example is the Busy line. If +5v (Logic 1) was applied to this pin and the status register read, it would return back a 0 in Bit 7 of the Status Register.

 

The output of the Parallel Port is normally TTL logic levels. The voltage levels are the easy part. The current you can sink and source varies from port to port. Most Parallel Ports implemented in ASIC, can sink and source around 12mA. However these are just some of the figures taken from Data sheets, Sink/Source 6mA, Source 12mA/Sink 20mA, Sink 16mA/Source 4mA, Sink/Source 12mA. As you can see they vary quite a bit. The best bet is to use a buffer, so the least current is drawn from the Parallel Port.

PREVIOUS NEXT

 

Free Software
Delphi

Lesson 1
Delphi Programming
1.1. IDE Delphi
1.2. Component


Lesson 2
Printer Port
/ LPT
1.1.Basic
1.2.Address
1.3.Port Register
1.4.8 Bit Data Input
1.5.Test Circuitry
1.6.Assignment

Lesson 3
Printer Port / LPT
Experiments

3.1.LED
3.2.Swicht
3.3.Motor Stepper
3.4.DAC
3.5.ADC
3.6.Graph Display

Lesson 4
Serial Port

4.1.Basic
4.2.Hardware
4.3.Port Register

Lesson 5
Serial Port Experiments

5.1.LED
5.2.Stepper Motor
5.3.Swicht
5.4.ADC

Lesson 6
Game Port
Joy Stick
6.1. Basic
6.2. Experiments