I'm designing a circuit and I need something to switch between two inputs. I don't have very much experience, but I think a certain type of flip-flop will do this?
I'm using a 555 (as a monostable vibrator), and I need the same momentary push button to toggle between the trigger and the reset lines. Basically it's like a metronome with a single start/stop switch.
The pushbutton is normally open. The capacitor is charged to the output of the right inverter. When you push the button, it changes the value of the input of the right inverter, causing it to change its output. This is independent of the starting state.
Use the real output (not the output after the 100k resistor) to drive the reset of the 555.
That looks great, but where do I put the trigger and reset lines from the 555?
You set up the 555 as an astable multivibrator, and let it free run. You connect this to the reset pin of the 555. When it is "high" output, the 555 will output pulses for you. When it is "low" output, the 555 will wait for a "high" output, and output no pulses.
The typical setup for an astable is to have two resistors and a capacitor. Connect the resistors in series with the capacitor between the voltage supply and ground. Connect the discharge pin between the resistors, and both the 'trigger' and 'threshold' to the cap:
--- Yes. Assuming you're talking about digital inputs and outputs, the whole thing can be done with a dual "D" type flip-flop and three NAND gates. View in Courier:
C1 Vcc>-+-[100nF]-+--------+-------+ | | |R1 | | | [1MR] | IN1 +---+ | | | | 4011 | | | U1a GND | U1b +-B U2a S1| O | +--+--+ +--+--+ NAND Y--+ | O +--|D S Q|-----+----|> S Q|------A | | | | | | _| +--A +------|> R | | +-|D R Q|-+ NAND Y-->OUT | +--+--+ | | +--+--+ | +--B U2c [10K] 4013| | +----|----+----B | |R2 +--[Rt]--+ | NAND Y--+ | | | | +-A U2b | +-[CR1>]-+ | | | [Ct] | | | | | IN2 GND>-+---------+----------------+ Select Rt and Ct for a time constant longer than the press-release cycle of S1.
On power-up, the S(et) inputs of U1a and B are pulled high momentarily by C1 and R1, forcing U1a-Q high, U1b-Q high and U1b-Q\\ low.
Since the signal on U1a-S will stay high longer than the edge from U1a-Q, U1b-Q will remain high and U1b-Q\\ will remain low until U1a times out and S1 is pressed.
U2a, b, and c comprise a 2-to-1 multiplexer, and with U1a high and U1b low, the logic signal appearing on IN1 will appear on OUT until S1 is pressed.
When S1 is pressed, U1a-Q will go high and will toggle the outputs of U1b, now causing the signal on IN2 to appear on OUT.
When U1a-Q goes high it also starts charging Ct through Rt, and when the voltage on U1a-R gets high enough it will reset U1a and discharge Ct quickly through CR1, which can be any common signal diode, say a
1N4148.
After that, every time S1 is pressed the cycle will begin anew and the signal on OUT will alternate between the signal on IN1 and IN2.
If you decide to build this circuit, be sure to connect the inputs of the unused NAND to either Vcc or GND.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.