EE Question: I'm wondering how to design this simple circuit...

Stealth1024

Platinum Member
Aug 9, 2000
2,266
0
0
Alrighty, I'm a first year CE major and taking Digital Systems course and I'm pondering how to make a simple circuit that has one input and one output.... push the button once, output turns on, push again, output turns off, etc. I started trying to do this with a S'R' flip flop sort of circuit and I have it to a point now where when I push down the button it just flips in an infinite loop between the two states and when I let go it radomly stays in one state or the other. Of course this doesn't work and I almost think I need some sort of memory and some other knowledge that I don't have yet to do this simple little thing...


So, I'm just wondering if an EE and CE person could give me a bit of an education here. Thanks!

...and yes I've tried google and found some circuits utilizing OP-AMPS.... but my little kit only has AND's, OR's, INVERTERs, NAND's, NOR's, MUX's, DEC/INC's, etc.... on the other hand an op amp is similar to an XOR when used for binary on/off ?
 

Demon-Xanth

Lifer
Feb 15, 2000
20,551
2
81
JK flip flop.
Tie the J and K lines high and use the button to run the clock. Make sure the preset and clear lines are tied appropriately.
 

brjames

Member
Apr 25, 2001
168
0
0
Originally posted by: Demon-Xanth
JK flip flop.
Tie the J and K lines high and use the button to run the clock. Make sure the preset and clear lines are tied appropriately.

We call that a Toggle flop
:)
 

Harvey

Administrator<br>Elite Member
Oct 9, 1999
35,057
67
91
You may also want to use a simple debouncing circuit for your pushbutton to keep it from toggling the flipflop more than once for each button push.
 

TuxDave

Lifer
Oct 8, 2002
10,571
3
71
All the posts above work. If you want extra details on how to build a j/k flip flop, you can try googling for "Bistable Multivibrators" I think that's the circuits term for a flip-flop.

 

Stealth1024

Platinum Member
Aug 9, 2000
2,266
0
0
Thanks. I'm looking at a circuit diagram for the JK at the moment.

I have two problems as far as I see:

1. This is upcoming course material, I'm just having some fun tackling problems I tried to solve as a kid with the radio shack breadboard..
2. I don't have any individuals transistors or capacitors here at the moment to play around with :)

Off to do some experimenting!
 

brxndxn

Diamond Member
Apr 3, 2001
8,475
0
76
I think you guys are seriously wrong...

You're trying to make a debounce switch that will serve as a clock, I believe.

You can make one with 2 NAND gates... where each input and output is connected in reverse to the input and output on the other NAND gate...


Basically this: X=AY and Y=BX.. Then, just connect your output to one of the outputs on the NAND gate.. I believe one will be Active High and the other will be Active Low.. or you could use a 74'141' I believe.

But, remember that I am stupid.

BTW, you will also need a resistor that connects to the inputs on the 3-way switch from positive.. along with the inputs for the NAND gates