Hi everyone! Yesterday, I connected an LED (Light Emitting Diode) to the parallel port of my computer. Then, I wrote a program to access the parallel port and control the LED. Why did I do this? Well, I just wanted to do something real and physical with my computer. It was really fun!
In my application, I used the data ports on the parallel port for controlling the LEDs. There are eight data ports. So, when I don't send any signal do the data port, its closed ("00000000") and the eight pins have no voltage on it. But, when I send decimal "255" (binary "11111111"), all the pins have a +3.3 V (I was expecting to get +5 V, but for some reason I was getting only 3.3 V). The Windows scientific Calculator came in handy for doing the binary to decimal conversions. I sent values like, decimal "231" (binary "11100111") -- Here, all the pins except the two in the middle were OFF.
Here are two articles which helped me:
- How to connect an LED to a computer's parallel port by T.K. Boyd
- I/O Ports Uncensored - 1 - Controlling LEDs (Light Emitting Diodes) with Parallel Port by Levent Saltuklaroglu
Well, I really enjoyed making this and I'd love to hear your comments. :)