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.

Latching ic, is there such a thing?

Status
Not open for further replies.

shaneshane1

New Member
A latching relay uses a pulse to latch its connection and it stays that way until it is pulsed again.

I was wondering if there is a integrated circuit that plays a similar roll.

eg: input a pulse to the input of an ic, and the output goes high, pulse the same input again and then the output goes low???? if so what is it called?

I dont have any plans for this idea yet, just curious!!!
 
what kind of pulses you mean?

can 555 timer do the job in this case???
 
no not a 555!!!

more like a momentary switch, so if i tap the switch the output will stay high and if i tap it again the output will go low? so the input first goes high when i tap the switch and then goes low but the output remains high until i tap the switch again???
 
shaneshane1 said:
no not a 555!!!

more like a momentary switch, so if i tap the switch the output will stay high and if i tap it again the output will go low? so the input first goes high when i tap the switch and then goes low but the output remains high until i tap the switch again???

A HEF4013 is one type of dual-bistable latch ic, there are a number of other types.
What are you trying to do?
 
Im not sure what i want to do yet, but whatever i end up doing, i dont want a chunky relay doing the job, eg, it might be some sort of robot with wheels with momentary switches on all four sides, when one switch gets taped then the robot goes the other way and if that same switch gets taped again then it goes another way, but this is just a example.
 
The structure you want is called a T-flip-flop. The T stands for "toggle". It can be constructed from the D-flip-flop or the JK-flip-flop by feeding the Q-bar output back to the input. Then at each clock edge, either rising or falling depending on the individual flip-flop the Q output will change state.
 
Papabravo said:
It can be constructed from the D-flip-flop or the JK-flip-flop by feeding the Q-bar output back to the input.
How fantastic I never would have thought of such a thing... I love this place, so much knowledge lol...
 
erosennin said:
How fantastic I never would have thought of such a thing... I love this place, so much knowledge lol...

This is an example of what we mean.:)
 
Last edited:
Haha yep... it's just that it never would have occured to me to do that. I need to go over The Art of Electronics properley (I'm sure it would be in there)... lol :D
 
A micocontroller can easily do this. You can also de-bounce the pushbutton with software, thus saving space and components.
 
Papabravo said:
The structure you want is called a T-flip-flop. The T stands for "toggle". It can be constructed from the D-flip-flop or the JK-flip-flop by feeding the Q-bar output back to the input. Then at each clock edge, either rising or falling depending on the individual flip-flop the Q output will change state.
The JK flip-flop doesn't require feedback to make it toggle. It only needs to have the J and K inputs both tied to a logic "1" (typically the positive supply).
 
Roff said:
The JK flip-flop doesn't require feedback to make it toggle. It only needs to have the J and K inputs both tied to a logic "1" (typically the positive supply).

hi Roff,

An image I posted sometime ago for another thread.

Regards
 
Last edited:
Ok well iv tried to neaten things up a little to get a better understanding of what i need to do, In this schematic i have a 4013 Dual D flip-flop CMOS IC?

down the left side is what i am using

is this the correct setup for what i want to do?

[A] I want to pulse the clock briefly and have the output (Q) stay high until the clock gets pulsed again?

Once the clock gets pulsed again the output (Q) will go low and stay low until the clock gets pulsed again, and so on?

[C] if this is correct do i need a pulldown resistor on the clock input if i a am using a momentary switch as my pulse?

and finally what do i do with the right side of the chip if its not in use?
 

Attachments

  • 4013 set up.PNG
    4013 set up.PNG
    9.9 KB · Views: 823
Last edited:
The problem with mechanical switches is that they don't switch cleanly. They bounce, creating several pulses each time the open, and each time they close. The bounce may last for several milliseconds (or more, if it is a large switch). Fortunately, you can debounce your switch with a couple of extra components. I used 3. The 100 ohm resistor is sometimes omitted. Including it limits the switch current into the capacitor, which otherwise might be several amps for a very short time.
The output will change state when you push the button, but not when you release it. This is called toggling, which has already been discussed. Is that what you want?
 

Attachments

  • 4013 set up2.PNG
    4013 set up2.PNG
    13.2 KB · Views: 1,034
yes when i push the button and release it i want the output to remain high, and once i push and release the button again i want the output to go low and stay low, and so on
 
shaneshane1 said:
yes when i push the button and release it i want the output to remain high, and once i push and release the button again i want the output to go low and stay low, and so on
It will change state on the push, not on the release. Is that OK?
 
Last edited:
I Just set the schematic up and it works 100% with the 100nF in place,just a quick question, you have posted in your schematic a 100k resistor, i would have said 10k, i have used them both and they are equally effective?
 
shaneshane1 said:
I Just set the schematic up and it works 100% with the 100nF in place,just a quick question, you have posted in your schematic a 100k resistor, i would have said 10k, i have used them both and they are equally effective?
The time constant is what's important. If you change the resistor to 10k, you have to change the capacitor to 1uF. 10k might not debounce reliably with 100nF.

Also - see my edit to my previous post.
 
im not sure if we are talking about the same resistor, im talking about the pulldown resistor from the clk pin to groung? is that the one you mean?
 
shaneshane1 said:
im not sure if we are talking about the same resistor, im talking about the pulldown resistor from the clk pin to groung? is that the one you mean?
Yep, that's the one.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top