Control LEDs from Parallel Port

It's interesting to interface the peripherals with the pc and control them. And I realized LEDs are the better to start and test with. Printer port if used for applications other than connecting a printer is called by the name parallel port. First thing to start along was to study the nature of parallel port. It has 8 data pins, communicated by using register at address 0x378 in almost all PCs. Usually its called LPT1 port.
The code would fail, if we try to access port in windows xp. This is because OS doesn't allow user mode programs to directly communicate with I/O ports. So i used a simple program called userport.exe.

1)it comes with a .sys file which is to be copied to 'drivers' directory in 'system32' in 'windows' directory!
2)next step is to run userport.exe in which the address range to be used(0378 to 037F) is fed.
3)and last step is to write code for control. I used Turbo C to write programs for it.
Watch the videos,

This shows the controlling of 3 LEDs with the 3 keys of keyboard!



Programming the LED 7-segment display