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.

Simple delay on one pin? (Also, a parts question)

Status
Not open for further replies.

Random

New Member
Hey! Forum neophyte here, but I think this site is just what I needed. ^_^

Two quick questions. First, I need a part (preferably something smaller than an IC) that will delay a logic-up clock. I'm using a D flip-flop in a lights circuit, hooked up like this:
**broken link removed**
But when I put it together with the circuit, I'm having a few problems keeping it stable - turning on/off like it should with each cycle, and flickering on the down-clocks. I'm thinking that it has something to do with the sequence of edges when it's activated:
if D=L: CK↑ -> Q↓/Q'↑ -> D↑
All as fast as the chip can register and output each one, which falls into the region of single-digit nanoseconds, where I think the chip gets confused about what's an input, rather than just a blip. So here's what I'm looking for, in order to give the D change the time it needs to stay stable for the clock.
**broken link removed**
I was thinking something like a capacitor, but I'm still not exactly clear on how it would work in this situation, so I couldn't say. Anything that comes to mind that would work for this application?
(If there's another reason the flickering/etc could be happening that I'm not thinking of, let me know. Here's the schematic:)
**broken link removed**



Also, the pins for jumpers on PC boards and such, the ones that stick straight out of the board - anyone know where I can get those? (I'm assuming Digi-Key or Mouser, but I have no idea what they'd be called. >_<)
 
You shouldn't need this unless your clock has glitches. Do you have good power supply decoupling? You need a capacitor (0.1uF should work) across the IC power supply pins, with the leads as short as possible. Also, do you have the preset and clear (sometimes called set and reset) pins connected to GND?
 
Ron H said:
You shouldn't need this unless your clock has glitches. Do you have good power supply decoupling? You need a capacitor (0.1uF should work) across the IC power supply pins, with the leads as short as possible. Also, do you have the preset and clear (sometimes called set and reset) pins connected to GND?

I have a .1uF filter capacitor hooked straight across the top of the IC, from pin 7 to pin 14. And since preset/clear are negative logic, I have them hooked to +5V. This is really the last bug I can see with why it wouldn't be working. Any ideas?
 
Random said:
Ron H said:
You shouldn't need this unless your clock has glitches. Do you have good power supply decoupling? You need a capacitor (0.1uF should work) across the IC power supply pins, with the leads as short as possible. Also, do you have the preset and clear (sometimes called set and reset) pins connected to GND?

I have a .1uF filter capacitor hooked straight across the top of the IC, from pin 7 to pin 14. And since preset/clear are negative logic, I have them hooked to +5V. This is really the last bug I can see with why it wouldn't be working. Any ideas?
Hmmm.... What is the source of your clock? Your schematic says "to NOR". What is in front of the NOR gate? Can you post a complete schematic?
You also need to tie all unused inputs on the other FF in the package to GND or to VCC.
 
Switching transients ?

If the FF is being driven by a slow or noisy pulse could it be racing ?
could you swap the NOR gate that drives it for a Schmitt device to try cleaning up the pulse edges ?
 
Ron H said:
Hmmm.... What is the source of your clock? Your schematic says "to NOR". What is in front of the NOR gate? Can you post a complete schematic?
You also need to tie all unused inputs on the other FF in the package to GND or to VCC.

... I'll try the GND/VCC binding now. Why would the other FF affect the first?

Okay, it seemed to work at first (removed some of the flickering), but now it seems I still have the problem of the clock being triggered on both the positive and negative edges. The input is literally hooked up to a NOR gate between the two buttons I'll press to activate the switch; since they're on negative logic, I want the L-L case only. What else could make it dual-edge like that? :/

btw, I found the connectors I was looking for. Molex 4-pin header connectors. Rawk. ^_^

(By the way, I have a 74HC123 on the board too, and that's not behaving funny at all. Both have filter capacitors on them. So I don't think it's the power source. I might hook the Q' up to a 555 to see if that does the trick, but I don't think that can delay from trigger time.)
 
Ah, switches. Do you have debouncers on them? Mechanical switches typically bounce when they are actuated. There are numerous ways to debounce switches. Search this forum and/or do a Google search for "switch debounce".
I didn't expect that tying the unused inputs down would cure your problem. It's just required with CMOS to prevent the unused gates (FF's, whatever) from drawing excessive current due to the floating inputs.
 
Thought of that already. The switch I'm using has a snap-action magnet, so I hooked a resistor from the pin to ground, and my switch goes from the pin to positive. This should eliminate any bounce, no?
 
Random said:
Thought of that already. The switch I'm using has a snap-action magnet, so I hooked a resistor from the pin to ground, and my switch goes from the pin to positive. This should eliminate any bounce, no?
Does it have a Hall-effect switch, or mechanical contacts? You can't fix mechanical contact bounce with a pullup resistor. Do you have a part number for the switch?
 
**broken link removed**

The ones on that page. How would I go about fixing it, if that's the problem? (Those switches are the same kind that'll be used in the final project.)
 
Random said:
http://www.cherrycorp.com/english/switches/miniature/e21.htm

The ones on that page. How would I go about fixing it, if that's the problem? (Those switches are the same kind that'll be used in the final project.)
That will almost certainly bounce. Do as ljcox recommended. I would search for "bounce", "debounce", etc. Also try a Google search, but include the word "switch".
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top