Professional Documents
Culture Documents
Paparala Port Interface
Paparala Port Interface
Paparala Port Interface
Hardware
The pin outs of DB25 connector is shown in the picture below
PSDRI
i i i en
g
n
i
g s
N r
n tv
o e
a ee
c
l rr
( t
n t
D i
a -e
B o
m d
2 n
e b
5
i
)
t
C
n o
S n
t Ot Y
1r u r e
o t os
b l
e -
0
ID
D
na
a
/tN
2t
Oa o
a
u-
0
t0
D
DI
a
an
tN
t/
3 ao
aO
-
1u
1
t
D
DI
a
an
tN
t/
4 ao
aO
-
2u
2
t
5DI DN
a n ao
t/t
a Oa
3u -
3
t
D
DI
a
an
tN
t/
6 ao
aO
-
4u
4
t
D
DI
a
an
tN
t/
7 ao
aO
-
5u
5
t
D
DI
a
an
tN
t/
8 ao
aO
-
6u
6
t
D
DI
a
an
tN
t/
9 ao
aO
-
7u
7
t
S
t
n a
AI t N
1
c n uo
0
k s
-
6
1BI SY
1u n t e
s as
y t
u
s
-
7
P S
a t
p a
eI t N
1
r n uo
2
- s
O -
u 5
t
S
t
S
a
e
ItN
1l
n uo
3e
s
c
-
t
4
C
L
o
i
n
n
tY
eO
1 re
fu
4 os
et
l
e
-
d
1
S
t
n
a
E
ItN
1r
n uo
5r
s
o
-
r
3
1n OCN
6I u o o
nt n
i t
t r
i o
a l
l
i -
z 2
e
n
S
e
C
l
o
e
n
c
tY
tO
1 re
-u
7 os
Pt
l
r
-
i
3
n
t
e
r
G
1r
8o
- u- - -
2n
5d
Programming Concepts
Almost all programming languages allow
programmers to access parallel port using some library
functions. For example , Borland C is providing "Inportb" and
"Outportb" functions to read or write IO mapped peripherals.
But the examples provided here in this tutorial is written VC+
+ and can be easily ported to other compilers like Borland C
and Turbo C. Visual Basic does not have any functions or
support to access parallel port directly, but it is possible to
add such capabilities to your VB application by writing a dll in
VC++ and calling its exported functions from VB. VC++
provides two functions to access IO mapped peripherals,
'_inp' for reading and '_outp' for writing. These functions are
declared in "conio.h".
Now you can see a dialog box with caption “Win32 Console
Application - step 1 of 1” (picture-4).
Picture-4