0

I am trying to build a shift register using only 2 inputs - a button to enter high, and a button to enter low. Since I'm not using a separate button for the clock, I need to make an edge detection circuit so that when a user presses a button it will automatically trigger the clock and put the input into the shift register.

Pressing the first button should:
Set DATA to HIGH and then immediately after set CLOCK to HIGH

Pressing the second button should:
Set DATA to LOW and then immediately after set CLOCK to HIGH

The circuit

I don't have an actual shift register IC, so I'm using SN74LS175N flip-flops (rising-edge) wired up to each other. So far I've built the circuit shown above. The pink output would go into CLOCK and the brown output would go into the first flipzflop's DATA (the capacitors at the top are 100 μF).

Essentially, it Schmitt inverts both of the button inputs twice in a row, then the double-inverted first button is output as DATA, and the double inversion for both buttons is put through a NOR gate and then a NOT gate which adds a time delay and makes it so that the clock gets triggered to HIGH if either button is pressed.

This works fine for a single flip-flop: pressing the first button sets it high and pressing the second button sets it low. The problem is, it becomes finnicky for multiple flip-flops. The buttons sometimes trigger multiple inputs, or will trigger again when they are released, and I'm not really sure how to fix that. Any help would be much appreciated.

ocrdu
  • 8,705
  • 21
  • 30
  • 42
  • 3
    This is called "debouncing". In your case I would probably just RC filter and comparator with hysteresis. Or the JK-flip-flop or SR flip flop methods if you want something more reliable. If you had a microcontroller or software then there are more convenient methods that use timers, blanking intervals, multiple sampling, but in your case you don't have those so you want more hardware based methods. – DKNguyen Oct 30 '22 at 04:51
  • I also totally agree with @DKNguyen - using RS flip-flop is good idea. In case of multiple destinations for switches I'm suggest to use buffers or gates in cooperation with one extra flip-flop. – Alexander Oct 30 '22 at 18:15

0 Answers0