Preset and Clear on RS Flip-Flop

  • Thread starter Thread starter wizkid00104
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around designing a flip-flop circuit that counts from 1 to 3 in binary without ever reaching 0. Participants explore the use of preset and clear pins on flip-flops, as well as the implications of asynchronous operations and circuit design strategies.

Discussion Character

  • Homework-related
  • Technical explanation
  • Exploratory
  • Debate/contested

Main Points Raised

  • One participant seeks suggestions on how to set the preset and clear on both flip-flops to avoid a binary 0 state.
  • Another participant questions the effects of preset and clear, asking for clarification on their functions and the resulting values when activated.
  • A participant suggests that preset connected to true initializes the flip-flop to 1, while clear connected to true sets it to 0, and inquires about grounding unused pins.
  • Discussion includes the asynchronous nature of preset and clear, with one participant suggesting the need for additional gates to manage transitions and avoid glitches.
  • A participant describes a reset circuit involving a resistor and capacitor, asking for an explanation of its function in the context of the flip-flop design.
  • Further elaboration on a specific counter design is provided, detailing how the circuit transitions through binary states and the necessity of avoiding the 00 state.
  • Participants discuss the implications of the counter reaching 00 and the need for a solution to prevent this state from appearing, suggesting the addition of more flip-flops as a potential approach.

Areas of Agreement / Disagreement

Participants express varying levels of understanding regarding the function of preset and clear pins, and there is no consensus on the best approach to prevent the circuit from reaching a binary 0 state. Multiple competing views and suggestions remain throughout the discussion.

Contextual Notes

Some assumptions about the circuit design and the behavior of flip-flops are not fully explored, and there are unresolved questions regarding the implementation of the reset circuit and the handling of glitches.

wizkid00104
Messages
3
Reaction score
0

Homework Statement



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?


Homework Equations


None


The Attempt at a Solution


None
 
Physics news on Phys.org
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.
 
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?
 
Good.

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.
 
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?
 
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

Go to the bottom and look at the picture. Mentally delete the lower two flip flops (they are not needed) and pull E high. Let's 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:
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.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
20
Views
4K
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
6K
Replies
1
Views
4K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 10 ·
Replies
10
Views
6K