Monday, October 11, 2010

Computer Controlled LED Chaser

Chasers are as old as electronics. What about having a chaser controlled by computer?

OK. Then let's have fun with this stuff.

A linux OS is required for the efficient running of this code. The following program can also be run on Windows system by installing GCC in it. We are going to make an 8 LED chaser controlled by the computer using it's parallel port. If you are a beginner to parallel port, it is recommended to read an intoduction to parallel port before further moving down this article.

For controlling the chaser we need to program the parallel port.Download the C program for controlling ppt.c. Basic knowledge of the C program will be enough for understanding the code. It is recommended that you read parallel port programming in linux to make your task easier.

Binary output at the parallel port for LED switching is as shown below. Here D0,D1,D2,D3,D4,D5,D6,D7, D8 corresponds to parallel port pins 2,3,4,5,6,7,8,9. A logic one at a pin corresponds to a +5V. This can turn ON a LED. A logic zero at a pin corresponds to a 0V. This will turn OFF a LED. It is based on the data from the table given below the code for LED switching is written. 


Now we have to setup a simple circuit shown below.
 
Be carefull while making the connections. Once every thing is setup, carefully connect this circuit to the PC's parallel port. Now it is enough to run the program you downloaded.

Running the program
Open the Terminal
Navigate to the folder which contains the program.
Type " gcc ppt.c " without quotes. Now the program is compiled.
Type " ./a.out " without quotes to run the program.
Now you can see your LED chaser working. 

Disclaimer Notice: Technoburst will not be responsible for any problems which arises due to the execution of above mentioned steps.

1 comments:

Mikaeel said...

Useful read regards Computer Controlled LED Chaser. Well Chasers are very old as electronics and it is required by Linux OS.

Thanks & Regards
UPS Power Solutions

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | coupon codes