Zastin
01-21-2009, 03:54 AM
hi all umm recently for my project i received a bcd thumbwheel switch that has 4 inputs pins which is the binary bits i think and a common ground, meaning theres actually 5 wires coming out from the switch.
ive assigned 4 pins of 1 of my IC chip to the 4 wires and the last wire will be going to ground.
ive actually had the program to control my bi color led changing from red to green every few 2 seconds(written in the c program using delay)
the problem now is, actually i am needed to use thumbwheel switch to set the delays of the lights changing colors instead of only 2 seconds(unless i change the delay in the c program again to whatever value)
example if the thumbwheel switch is in number 1, the delay will be 10seconds and if its 2 it will be 20 seconds.
i will be posting the pictures of the thumbwheel tonight as im in school now actually.
please help me with the c program thx^^. im using keil c uvision version3
cheers:p
ive assigned 4 pins of 1 of my IC chip to the 4 wires and the last wire will be going to ground.
ive actually had the program to control my bi color led changing from red to green every few 2 seconds(written in the c program using delay)
the problem now is, actually i am needed to use thumbwheel switch to set the delays of the lights changing colors instead of only 2 seconds(unless i change the delay in the c program again to whatever value)
example if the thumbwheel switch is in number 1, the delay will be 10seconds and if its 2 it will be 20 seconds.
i will be posting the pictures of the thumbwheel tonight as im in school now actually.
please help me with the c program thx^^. im using keil c uvision version3
cheers:p