I can't create my own JK flip flop and counter #1108
-
My goal is to build my own chips from logic gates and then use them for other circuits. Unfortunately I can't build a JK flip flop and a counter. Now I want start with the simplest options for a JK flip flop and a counter. Can anyone help me or link to a schematic wich works for digital? I'm obviously too stupid to find anything suitable on google... Please don't be surprised, I'm a beginner. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
The idea for your JK flip-flop is not so bad. You just overlooked that your circuit essentially corresponds to an inverter which is fed back to itself: Such a circuit cannot achieve a stabilized state. Therefore, this direct feedback must be prevented for the circuit to work. The three gates directly behind the clock input are used to generate the pulse. The second possibility is to use both edges, the rising and the falling edge of the clock to forward the signal. This approach leads to a master-slave flip-flop. Since the clock cannot be high and low at the same time, the flipflop is never transparent with respect to changes of an input. Both implementations can be found in the examples folder (examples/sequential/JK-T.dig and JK-MS.dig). |
Beta Was this translation helpful? Give feedback.
-
Thank you for the interesting discussion. I tried to study the detailed behaviour of the pulses in the two cases given by Mr. Neeman and then to compare with the non working J-K flip flop shown at the very beginning of the discussion. To see all details I used the Q1: What did I overlook ? |
Beta Was this translation helpful? Give feedback.
The idea for your JK flip-flop is not so bad. You just overlooked that your circuit essentially corresponds to an inverter which is fed back to itself:
Such a circuit cannot achieve a stabilized state.
Therefore, this direct feedback must be prevented for the circuit to work.
And there are two ways to do that: One can either make the switching pulse so short that no oscillation can occur, because there is not enough time for that. To do this, the rising edge is transformed into a very short pulse. Just long enough to toggle the flipflop, but not long enough for multiple toggles.
The three gates directly behind the clock input are used to generate the pulse.
The second possibility is to …