English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

a day ago I asked about the T flip flop but no one gave me a circuit figure, here is what I am trying to do , I have a led that i want it to be dim when the switch is open , when I close the switch it will glow, when opening the switch again I want it ti still glow , the next time I close the switch I want it to dim (go off) , I tried that with a simulation program but not working , here it is , I putted the JK flip flop and connected the J and K with one switch , and I fed the CK pin with a pulser, and in the output i putted one LED for the Q , but here it is what goes when I open the switch the LED will flash very quickly , when i close the switch then , It will randomly select any of dimming or glowing , I don't want that ,, please attach or link me to an application so I can figure out how it works, Thanks...

2006-09-24 11:41:06 · 5 answers · asked by Manzo Crich 1 in Science & Mathematics Engineering

here it is what i am talking about ,, I don't want the led flashes quicly when i close the switch , i want it to be toggled with my switch , one toggle

http://img84.imageshack.us/my.php?image=tffsy7.jpg

2006-09-24 12:54:04 · update #1

5 answers

Mmm, now that I read this other question you posted, I think the answer about metastability I gave you (for another question) may be too far-fetched for what you are dealing with...

Ok, they already gave you a few pointers on how to solve this, but I would like to ellaborate:

1) Tie the J and K inputs to a 1 but do it through a resistor for improved reliability.

2) Use a series resistor in the connection to the LED. The value should be the one that provides the most current you can take from the FF to drive the LED, because the LED would shine nicely if you feed it 20mA but the IC probably cannot source as much. It probably can sink more than it can source, so it would be better to connect the LED's other terminal to +Vcc so that it turns on when Q=0. If the IC can sink, for example, 10mA, then choose R = (Vcc-Vfled)/10mA . Typical values would be (5V-1.8V)/10mA which result in a 360 ohm resistor.... But the IC may not be capable of sinking a suitable amount of current and you may need to add a transistor.

3) Tie the R and S inputs to ground. You shouldn't leave inputs floating, as you did in your schematic not only with R and S but also with J/K when the switch was open.

4) The switch will feed the clock input, but through a debouncer as they already told you. As debouncer you can use schmitt-triggered inverters like this:

4a) One terminal of the switch connected to ground and the other to the input of one inverter. That input also connected to +Vcc through a 10 Kohm resistor.

4b) The output of that inverter connected to the input of another through a resistor R. That input also connected to ground through a capacitor C. This way, the output of the first inverter will charge/discharge the capacitor through R. I think R=10K and C=0.1 uF may work, use larger values if you still observe bounces.

4c) The output of that second inverter has to be inverted by means of a third inverter and then input to CP of the FF. The reason for this third inversion is that in your requirement you need a change in the rising edge of CP, but with the switch connected as I say you would have a negative when pressed, unless inverted again.

See what IC you can use, it is very important that they be schmitt-triggers. Now I can recall the CD4093, which are NAND gates but you can connect their inputs and use them as inverters. Check which ICs correspond to the technology you are using.

Hope it helps.

2006-09-25 00:57:17 · answer #1 · answered by Andy D. 2 · 0 0

Watch out what switch you are using. Since you use a flip-flop IC, these things are very fast. If your switch contact "bounces" then you can get 2 (or more) pulses instead of the intended one.
This leads to totally random results.
That's why most people who design circuits with mechanical devices triggering TTL or CMOS devices use either 2 cross-over NAND gates to ensure only one pulse per switch action, or at least put a capacitor between the clock input and 0Volt, to artificially slow down the reaction time.

2006-09-24 21:17:56 · answer #2 · answered by Marianna 6 · 0 0

sounds linke to me you are wiring the flip flop right wrong aplication but if you put a switch on the clock and different voltages on the j and K and the switch on the clock would determine the state of the led

2006-09-24 18:57:45 · answer #3 · answered by Paul G 5 · 0 0

If you are using a J-K FF then just connect the J and K lead to 1, then whenever you clock the FF the output will toggle. That is a T FF (toggle FF).

2006-09-24 18:55:51 · answer #4 · answered by rscanner 6 · 0 0

Here is a site that shows a circuit using a JK flip-flop
http://www.olemiss.edu/courses/EE/ELE_335/Spring2000/Htmlnotes/DJKTFlipFlops/sld012.htm

2006-09-26 00:14:07 · answer #5 · answered by DoctaB01 2 · 0 0

fedest.com, questions and answers