Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Problem with Flip-Flop latching circuit

Status
Not open for further replies.
@ljcox: I have a bypass cap installed between Vdd/Vss pins as u said. And about rise/fall times, Ron H said that Set and Reset pins aren't affected by slow rise/fall..

@Ron H: Are u telling me 2 connect both set and reset to the switch? Cud u please explain a little so that i understand better?
And yeah, i have an unused 4558 section.
 
apakhira said:
@ljcox: I have a bypass cap installed between Vdd/Vss pins as u said. And about rise/fall times, Ron H said that Set and Reset pins aren't affected by slow rise/fall..

@Ron H: Are u telling me 2 connect both set and reset to the switch? Cud u please explain a little so that i understand better?
And yeah, i have an unused 4558 section.

Good. I have seen that circuit before. I expect that the S & R inputs are not rise time sensitive since they don't toggle the FF as the Clk input does.

I think what Ron means is to use a SPDT switch. Connect the common to gnd and the N/O to Set and the N/C to Reset. This does the bounce suppression since the FF is set when the N/O closes for the first time, so bounces don't matter. When the switch is released, the first closure of the N/C resets and again bounce has no effect.

You need pullup resistors to Vcc
 
apakhira said:
@ljcox: I have a bypass cap installed between Vdd/Vss pins as u said. And about rise/fall times, Ron H said that Set and Reset pins aren't affected by slow rise/fall..

@Ron H: Are u telling me 2 connect both set and reset to the switch? Cud u please explain a little so that i understand better?
And yeah, i have an unused 4558 section.
Here is what I had in mind. Tell us how it works. If it doesn't work, we'll need to know what the power supply pins of your 4558 are connected to. Warning: you will almost certainly have to add a transistor and some resistors to make a 4558 Schmitt trigger with logic-compatible output levels.
 

Attachments

  • debounce___toggle1.png
    debounce___toggle1.png
    7.1 KB · Views: 723
Ron, I don't see why you need C2. Bounce will not affect the Preset input so all it does is cause a relatively high current to flow every time the switch closes.
 
Ron, why do you have 2 4013's in your circuit?

I would rip out the left-most one, and connect the circuit connected to the ripped out "PRE" pin to the clock of the remaining 4013.
 
mstechca said:
Ron, why do you have 2 4013's in your circuit?

I would rip out the left-most one, and connect the circuit connected to the ripped out "PRE" pin to the clock of the remaining 4013.

If you read the previous posts he is having a problem with contact bounce.

The 4013 he is using does not have a Schmitt Trigger in its Clock input so the RC bounce filter he used did not work because it slowed the clock rise and fall times.
 
There still is a problem. The first FF wont RESET after the RC time elapses. I wonder if its due 2 the litlle large values i'm using with. I'll stop experimenting 4 now, coz i have my examinations soon. I'll resume after that
 
apakhira said:
There still is a problem. The first FF wont RESET after the RC time elapses. I wonder if its due 2 the litlle large values i'm using with. I'll stop experimenting 4 now, coz i have my examinations soon. I'll resume after that

The delay of the 100k, 100 nF will be about 10 ms. The button will be held longer then this, so the Preset will still be high when the reset should be happening.

Here is the Bounce Suppesssor that I use in my designs.
 

Attachments

  • bounce_suppressor.png
    bounce_suppressor.png
    1.2 KB · Views: 596
ljcox said:
apakhira said:
There still is a problem. The first FF wont RESET after the RC time elapses. I wonder if its due 2 the litlle large values i'm using with. I'll stop experimenting 4 now, coz i have my examinations soon. I'll resume after that

The delay of the 100k, 100 nF will be about 10 ms. The button will be held longer then this, so the Preset will still be high when the reset should be happening.

Here is the Bounce Suppesssor that I use in my designs.
I agree wholeheartedly that a Schmitt is the best solution.
Regarding the 4013 circuit: According to the datasheet, if preset and clear are both high, Q and Qnot are both high. I would think that, under these conditions, Q would go back low, and should be bounce-free due to the cap from preset to GND, shortly after the button is released. My interpretation of the schematic in the datasheet confirms this.
Maybe I'm wrong. I was wrong once before. :roll:
EDIT: The preset goes through a NOR gate and an inverter to get to the Q output. This is a substantial amount of gain, but the output fall time may still be too slow if the preset time constant is long. If it is short, switch bounce will propagate to the Q output when the button is released.
With apologies to Sir Walter Scott:
Oh what a tangled web we weave, when first we practice to avoid adding another IC to our design. :(
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top