Connecting LEDs to the Parallel Port

It looks fancy but it doesn't do much except that it is a good way to test your parallel port and above all clear your concept clear as to how the Parallel port works. In order to accomplish this task you will need the following: No. Name 1 LED (Light emitting Diodes) Any color 2 Resistor 470K Ohms or so Old discarded PC to Printer Cable (if 3 possible) Quantity 8 8 1

The last item can be expensive to buy, so try to use an old discarded printer cable, or at least a cable whose one end is a female Connector which connects to PC and the other end is bare wires coming out. Also make sure that you if you buy this cable, purchase one whose connectors can be opened. Not the one which are completely molded plastic. The resistors is needed to limit the current taken from parallel port to a value which light up acceptably normal LEDs and is still safe value. In practical case the output current will be few milli amperes for the LED, which will cause a typical LED to light up. Now the next step is to attach LEDs to the printer cable. If you are using a printer cable, you will need to open up the centrionics connector (the end which connects to the printer) and cut the wires from the metallic connector. If however it is a completely plastic molded you will have to cut the centrionics connecter away . Next open the RS32 Female connector i.e. the end which connects to the PC. Observe the wire colors which are connected to the Data pins and Ground Pins of the port. To remind you the Data pins are Pins 2 through 9 and the Ground 18 through 25.The connector face usually has pin numbers inscribed on it so you can see it quite easily. Note down the color of the data pins and the ground pins. The Ground pins are usually all connected to one wire. They are all common ground. Connect the LEDs according to Fig 1 shown below. Connect the circuit to the parallel port so that one end of the circuit goes to one data pin (that one you with to use for controlling that LED) and another one goes to any of the ground pins on the other end of the cable. Be sure to fit the circuit so that the LED positive lead (the longer one) goes to the data pin. If you put the led in the wrong way, it will not light in any condition. You can connect one circuit to each of the parallel port data pins.

C++ etc. See the photo below. Photo 1: LEDs connected to the Parallel Port [Enlarged view] Controlling the LEDs connected to the Port Before continuing Read about Parallel port Now to control the LEDs connected to the Parallel port through software you will need to know any programming language.Fig 1: LEDs connected to Parallel Port [Enlarged View] That's it now you are done. It is quite easy as we will see. You can fit your LEDs in the centrionics connector case a I have. because a little neglect can blow up you PC. You can also download my program which I have written in VB. tightly connected and observe all precautions. like Assembly. as you have read at the start of this section (Read them if you haven't). It . Recheck the connections and make sure they are according to the Diagram. C.

AL . In Binary every bit of that number controls one or more output bit.255 at the parallel port address.Port Address . Click on the link to your right to download it now.255 DX. Table below illustrates them.03BcH AL. 5 and 6 then output value would be: 2+8+16=26. In this way value for any bit combination can be calculated. Now as you know to turn any one of the LEDs I'll just pass a value to the port like this: ORG MOV MOV OUT 100h DX. DB25-Pin Data Pin Value 2 0 1 3 1 2 4 2 4 5 3 8 6 4 16 7 5 32 8 6 64 9 7 128 For example to turn on LEDs 2 and 3 to logic 1 then output value would be: 1+2=3. Also it should be noted that: Value 0 255 Description All LEDs OFF All LEDs ON .allows you to turn LEDs on/off connected to the 8-Data pins of parallel port. Assembly Language Here we will proceed with assembly. Similarly to set on pins 3.Data: All LEDs on To write to the eight data registers we can pass a value of 0 .

Sign up to vote on this title
UsefulNot useful