Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Preset and Clear on RS Flip-Flop

  1. Nov 14, 2008 #1
    1. The problem statement, all variables and given/known data

    I am designing a flip flop circuit to count form 1 to 3 in binary and it is not allowed to ever be at 0 in binary. This means I have to use the preset and clear pins on the flip flops. I was given a suggestion in my lab manual for these pins, but it is very vague and I am not sure how to do it. The circuit can start in binary 01, 10, or 11. What would be a suggestion to set the preset and clear on both flip flops?

    2. Relevant equations

    3. The attempt at a solution
  2. jcsd
  3. Nov 14, 2008 #2
    What does the preset do? What value would you have if you preset both flip-flops?
    What does the clear do? What values would you have if you clear both flip-flops?

    Give me a shot at what you think the answer is and I will help you further.
  4. Nov 14, 2008 #3
    I believe preset connected to true inializes the flip flop to to true. True on clear means the flip flop will start at zero.

    Will the unused clear and preset be connected to ground?

    Can preset and clear remain connected after the circuit is clocked?
  5. Nov 15, 2008 #4

    The clock doesn't affect the preset and clear, they are asynchronous. In other words if a preset goes high between clocks the output goes high regardless.

    And yes you definitely want to ground the unused preset and sets. Now, how can you use some gates to trigger a preset or set when the output goes to 00 so the output goes to 01? Keep in mind that the preset and set are async. Now, this causes a glitch, no? How are you going to cover this up? Maybe more flip flops? Play around with this and show us some work. Even if it doesn't work right, we can then help you.
  6. Nov 15, 2008 #5
    The circuit I was suggested to build is on paper, I have nothing to experiment with. I have never used a flip flop to preset a circuit. I was suggested to use a resistor connected to +5V and a capacitor to ground and the connection to the flip flop was between the resistor and the capacitor. I have no idea what this does though. It is called a reset circuit. Can you explain how I can use that?
  7. Nov 15, 2008 #6
    When I said play around, I meant on paper.

    Maybe I need to be more basic. Do you know how to build a counter that counts 00 01 10 00?
    Look it up on the web: http://ftp.csci.csusb.edu/schubert/tutorials/csci310/f03/dw4bit.pdf [Broken]

    Go to the bottom and look at the picture. Mentally delete the lower two flip flops (they are not needed) and pull E high. Lets assume that the circuit starts with 0's at the output of each flip-flip. (you can make this happen by pulling the clear high momentarily). The high on the E combined with the low on the feed-back output causes the output of the x-or gate (the one with the funny line behind it) to go high (a x-or gate has a high output if the input is 01 or 10, low otherwise). This causes the upper flip-flop to go high on the next clock. The lower flip-flop will stay low because the AND gate has 01 on it and it needs 11 to go high, low otherwise (that is the one with the rounded end). Opps, I have to go to church. I'll be back in a could of hours to explain more. Look at the drawing and see if what I am saying makes sense.
    Last edited by a moderator: May 3, 2017
  8. Nov 15, 2008 #7
    Church didn't work out. I am going tomorrow so here I am again.

    Now at this point, the output of the uppermost flip-flop is 1 and the lower flip-flop is 0 so the counter has counted to 01 (binary 1). OK? The upper x-or gate has a 11 on its inputs (output 0), and the AND gate has a 11 on its inputs so the lower x-or gate has 01 on its inputs (output 1). The next clock causes the lower flip-flop to go to one and the upper to go to zero (10 or binary 2). The counter has now counted to 2.

    The next clock causes the flip flops to go to 11 (binary three) and the next clock will cause the flip-flop to go back to 00 (binary 0). So with each clock, the counter goes from 00 to 01 to 10 to 11 to 00, etc or 0,1,2,3,0,1,2,3.... that is why it is called a counter.

    Look at this circuit and make sure you understand it, because that understanding is basic to solving your problem!!!

    Now that I have you to base one, your assignment is to add gates so that 00 causes the flip flops to go to 01 whenever the output goes to 00 by using the presets and resets. However, once you solve this problem, you will notice that 00 appears on the output for an instant. This according to your original problem description is unacceptable. So you need to fix it. How? (suggestion add more flip-flops... Where?) Think, I am not going to solve this problem for you. Write some things down on paper and share them with me. Use the circuit I pointed out to you on the web as a starting point.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook