I have a push button and two LEDs (red and blue).
I want them to be assembelled such that
1. When I press the push button, one of the LED is turned on and glows. It stops after I release the button.
2. When I press the push button again, another LED is turned on. It also stops after I release the button.
3. Repeat 2.
Here is a pic for help.
I think I need to use things such as Flip-flop, But I don't know how to use them. Any help will be greatly appriciated.
I think, my question was too much confusing.
What I am basically asking is --> how to make a single push button turn on two different LEDs turn by turn?
After spending much time on learning about flip-flops, one question has stilled remained an answered to me-->
How do I create a clock signal??? Does pressing a momentary switch simulate the clock signal?
The "clock" is just a switch closure in your case. It either pulls the clock input high then low, oo low and then high, depending on the particular flip flop logic or chip. Mechanical switches actually bounce open and closed several times, very quickly as they close. To prevent this from toggling you FF several times you add a "debounce" circuit to your switch: How to debounce a switch
I set J=k=1 (i.e. Applied Vcc to both J and K pins) and I used a momentary switch to send a + signal (Vcc) to clock (Cp) pin for a short time.
But the problem is that the Q and Q' pin never toggled state. It was always Q=0 and Q' = 1. Where am I getting wrong?
KMoffett, I tried what you told and it worked!!! Thanks a lot.
(At first I was quite lazy to tie unused pin of the unused FF2 to +5 Volts. But it didn't work. So, finally I gave a last try by connecting all of the unused pins to +5 volts or GND (except outputs). And my last try paid me off.)
I am sorry but I needed to use push to make switch. (Actually, I will be using a +5 Volt pulse that comes from another circuit. I want this circuit to be triggered on the end of the pulse)
I am sorry but I needed to use push to make switch. (Actually, I will be using a +5 Volt pulse that comes from another circuit. I want this circuit to be triggered on the end of the pulse)
I am sorry but I needed to use push to make switch. (Actually, I will be using a +5 Volt pulse that comes from another circuit. I want this circuit to be triggered on the end of the pulse)
1. Push to make on positive edge
2. Release to make on positive edge
3. Push to make on negative edge
4. Release to make on negative edge
5. Make your wife jump on the switch (result uncertain)
6. Forget it.
That's what I mean torturing forum members with unborn solution findings.
This is no place for quizzes or riddles!
Just keep in mind what it would cost you ordering an electronic designer with your nebulous and/or/perhaps on monday logic!