PC Interfacing for beginners
 
Prerequisites: Knowledge of C or C++ language
 
Needed: An IBM PC with Parallel (or LPT) Port on it, Windows 9x Operating system  [NT based Operating systems like Windows XP will be covered later]
 
Warning: As the parallel port can be easily damaged, be careful with the connections and programming
 
Introduction:
                Students or beginners who start to do a project hear a word called “PC interfaced xxxxx”. This means a project is interfaced or connected with the PC in some manner so that the PC controls it through some software like C, C++, BASIC etc. The most general way of doing this is by connecting the project with most popular parallel port available on all the PCs. But without knowing the basic of the port, it’s not possible to develop a PC based project. This article slowly takes you through the ways to make your own projects.

  * I again warn you on the Parallel port as it can be easily damaged with wrong circuits and it can lead to whole motherboard replacement. I will not be responsible for any damage caused by following this article.

 

Parallel port:
        Every PC has at least one LPT parallel port. This port has 3 internal ports as
i)                    Data port                     – 8 bit port with Write only
                                                           [can be configured to read values]
 
ii)                   Status port                  – 5 bit port with Read Only
iii)                 Control port                 -  4 bit port with Read and Write.
You may wonder like why so these discrepancy between the available ports in LPT. In the beginning, LPT port was only used for printer device, so the data port (8 bits) is used for sending data to the printer and can not receive data from it. Also some of the port signals are hardware inverted. But now, as the technology advances and devices increased, the ports were improved to transfer data still faster and bidirectional but the hardware inversion of port signals remains same. So it’s important to know the hardware configuration of LPT first.
Parallel port on a PC
 

Click on image for large view

 
The above picture shows the location of the parallel port in a desktop PC. This is a 25 pin DIN connector of female type. To connect our circuits with it, we need a 25 pin DIN connector of male type.
 
 
Parallel port pin diagram
 

Click on image for large view

               
 The above picture shows the pin configuration of ports present in parallel port. D0 through D7 is data port. There is no inversion in it. S3 through S7 is status port which is read only. C0 through C3 indicated control port which is Read and Write port. The bar on signal names indicated it is inverted internally.

Signal names

Pin No (DB25) 

 Signal Name

 Direction

 Register bit

Inverted 

 1

 nStrobe

Out 

Control-0 

 Yes

 2

 Data 0

In/Out

 Data-0

 No

 3

 Data 1

In/Out

Data-1

No

 4

 Data 2

In/Out

Data- 2

No

 5

 Data 3

In/Out

 Data-3

No

 6

 Data 4

In/Out

 Data-4

No

 7

 Data 5

In/Out

 Data-5

No

 8

 Data 6

In/Out

 Data-6

No

 9

 Data 7

In/Out

 Data-7

No 

 10

 nAck

 In

Status-6

No

 11

 Busy

In

Status-7 

 Yes

 12

 paper-Out

 In

Status-5 

 No

 13

 Select

 In

Status-4 

 No

 14

 Linefeed

Out

Control-1

Yes

 15

 nError

In

Status-3

 No

 16

nInitialize

Out

 Control-2

 No

 17

 nSelect-Printer

 Out

 Control-3

 Yes

18

    Ground

-

 
  The above table shows the pin name, the port assigned to it and whether it is inverted or not. Just try to remember the things which were mentioned in this part. later parts will cover the subject in-depth.
 
End of Part I

We welcome you all to learn and share knowledge on electronics projects
Recent Article:

Starting with PC interfacing Click here

Starting with PC interfacing Click here
Today, there were 1 visitors (1 hits) on this page!
This website was created for free with Own-Free-Website.com. Would you also like to have your own website?
Sign up for free