16 October 2006 v1.0
Elec: 3.5 Comp: 2 Mech: 0
As of 2012, the 25 pin parallel port is obsolete. The bellow tutorial is kept for archival purposes only.
In this tutorial we will flash a LED (Light Emitting Diode) connected to your printer port socket. Read part 1 here.
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.
36 Pin Parallel Centronics
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