Saturday, January 2, 2010

My College Projeect


Well its the outcome of a long struggle.We were finally able to make a switching systems with the help of the printer port of the computer.On the left is an image showing the place to find a printer port.On the right is a n external printer jack(hand-made)from
which we pull a few wires to bring it down to a breadboard.Below is a picture of the breadboard with LEDs connected.We also used a small fan for the test.
Now after establishing the connections,we turned on the PC and using Unix operating systems,we wrote a simple C program to make a user menu of switches,where the user is capable of turning on and off any switch as per his choice.Also for a better effect we made a display of timer to show a sequence in which the lights may glow on and off in a sequential manner.Following is an image showing LEDs 2,4 and 6 are glowing.

Well the logic is very simple and requires the user to know the bit number.For example 00000011 (base 2) would imply that we want to glow 1st and 2nd lights.So consider its binary equivalent ie 3.So if you use outb (3,BASE); you will know that pins 1 and 2 have received some current whereas the other pins have zero current.Here BASE imply the starting address of the printer port.It is usually 0x378.Now you can use any logic and swap values for a better presentation.Well this is my project members,and below is me.
.

No comments:

Post a Comment