PC Parallel Port Interfacing Techniques – Part 2

16 October 2006 v1.0

Elec: 3.5 Comp: 2 Mech: 0

Note

As of 2012, the 25 pin parallel port is obsolete. The bellow tutorial is kept for archival purposes only.

Introduction

In this tutorial we will flash a LED (Light Emitting Diode) connected to your printer port socket. Read part 1 here.

Connections

To connect a LED to your port first you have to know what it looks like. Here are the two most common connectors that you can have.

Pin Layout:

36 Pin Parallel Centronics

The LED

Shown below is a very common LED found anywhere from toys to computers. To connect, insert the positive pin into Pin number 2 of your port. And the negative to any ground of your connector. Pin 19 is an easy reach.

In the above image the longer pin is positive and the shorter one is negative (ground). If you have a LED looking like the left one then you have to find out yourself which one is +/- by connecting it to a battery. I would recommend a 220ohm or 470ohm resistor in series with the LED. Mine worked without the resistor but I cannot promise anyone!

After you finish this setup, it is now time to test the light! See if you have really found out the correct address by following the first tutorial then download this ( http://www.beyondlogic.org/pardebug/spp20.zip)** to have real-time control over your Port to test the light.

Open the executable; you should see a blue screen with port addresses, pins and their description. Choose the address where you have connected the port wire, and click on PIN 2 (Data 0) (there should be a cross on it now). Look at the LED, it must glow. If it does not glow then try different Port addresses, LPT1, LPT2 etc.

Programming the Parallel Port in C, C++, VB or Java with ‘Windows the great XP’ is not easy since it does not allow you to access the Ports directly. All hardware is virtualised. I somehow have a feeling programming in VB is easier. Very basic LED flashing is also easy through Assembly Language. I’ll look into this problem and post a tutorial soon.

Dont hesitate, ask me if you have trouble with anything!!! Writing a tutorial from scratch is not easy so please don’t mind random grammar mistakes

Some Useful links:

http://www.epanorama.net/circuits/parallel_output.html : A very detailed look into the Port basics and programming.

http://www.logix4u.net/ : Excellent for explanation on Win NT/XP programming.

** http://www.beyondlogic.org/pardebug/pdebug.htm : The Debug program to test your parallel port with LED

Advertisements
This entry was posted in Technology and tagged , , , , . Bookmark the permalink.

3 Responses to PC Parallel Port Interfacing Techniques – Part 2

  1. sangeetha says:

    i like this project verymuch in this projects i got lot of points

  2. Ali Gul Sarparrah says:

    thanks alot………..
    this link solved my problem which i was facing from 1 year.
    thanks thanks
    if you have other projects plz share with me.

  3. Varun D says:

    welcome! Nice to know, this has helped someone! Share my blog with electronic enthusiasts and others if you like 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s