Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

help with cd4022, how to connect it?

Status
Not open for further replies.
I've seen your posts and know that you are experienced with electronics. So I know that you have taken care of decoupling capacitors, good grounding (earthing) practices, ensuring all unused input pins are terminated, etc, etc.

So............
In my experience, any counter that "goes crazy" is because the transitions are not clean.
Either: 1) there is high frequency noise during the transitions, or 2) those transitions are slow.

This is very simply corrected by adding a schmitt trigger between the input and the signal. If the signal is too noisy, you may require some filtering.
 

I've seen your posts and know that you are experienced with electronics. So I know that you have taken care of decoupling capacitors, good grounding (earthing) practices, ensuring all unused input pins are terminated, etc, etc.

So............
In my experience, any counter that "goes crazy" is because the transitions are not clean.
Either: 1) there is high frequency noise during the transitions, or 2) those transitions are slow.

This is very simply corrected by adding a schmitt trigger between the input and the signal. If the signal is too noisy, you may require some filtering.
That is weird, thought it would be straight forward for such a simple circuit. The clock is simply a momentary switch to the vcc. The Clock inhibit and the reset are connected to the GND and the carry out is left unconnected. Only one of the outputs is connected, just to test the circuit and the others are left unconnected. The connected output seems to continuously switch on and off at a rate of about 10Hz or so. When I press the button (rising clock edge) the output stays even ON or OFF randomly, for as long as I keep the button pressed.
I do not know what is hapening!
The decoupling capacitor did not seem to do any good.
 

The clock is simply a momentary switch to the vcc.
There is a pull-down resistor from clock to GND, right?
Otherwise, the clock input could pick up 50 (or 60) Hz from mains and the output would switch at 1/8 times that frequency except when the button is pressed, leaving the output at a stable level since the counter stops counting.
Regards

Z
 
  • Like
Reactions: neazoi

    neazoi

    Points: 2
    Helpful Answer Positive Rating
There is a pull-down resistor from clock to GND, right?
Otherwise, the clock input could pick up 50 (or 60) Hz from mains and the output would switch at 1/8 times that frequency except when the button is pressed, leaving the output at a stable level since the counter stops counting.
Regards

Z
Ok I connected a 10k pull down resistor from clk to gnd.
This stopped the random oscillations, but the counter does not work as expected as the switching is random and do not follow the octal sequential scheme.
Maybe I have to terminate the outputs with pull down resistors as well?
Or maybe the momentary switch introduces glitches that count as clock pulses themselves?
I never thought this simple logic could be so critical at low speeds!
 

Or maybe the momentary switch introduces glitches that count as clock pulses themselves?
Yes, the switch introduces a lot of bouncing. A debouncing circuit must be used.
A simpe capacitor in parallel with the switch can work, but something a bit more sophisticated is more sure. Look for debouncing switch circuit.
Regards

Z
 
  • Like
Reactions: neazoi

    neazoi

    Points: 2
    Helpful Answer Positive Rating
Yes, the switch introduces a lot of bouncing. A debouncing circuit must be used.
A simpe capacitor in parallel with the switch can work, but something a bit more sophisticated is more sure. Look for debouncing switch circuit.
Regards

Z
Since I intend in future to provide the clock from the LPT port of the PC (through software) would I still need the debounching circuit then?
 

Not for debouncing, but some caution must be taken.
Care about level adaptation, assuring that the inputs are not left open in case the cable can be unconnected. Some protection against transients should be provided if the circuit can be hot-connected.
Regards

Z
 
  • Like
Reactions: neazoi

    neazoi

    Points: 2
    Helpful Answer Positive Rating
Not for debouncing, but some caution must be taken.
Care about level adaptation, assuring that the inputs are not left open in case the cable can be unconnected. Some protection against transients should be provided if the circuit can be hot-connected.
Regards

Z
Yes indeed, I have tested it from the LPT and a debounching mechanism is not required. Level is not a problem on LPT since 5V is the HI, and if it is to be connected and disconnected some transients protection mechanism is needed. Alternatively if the clock pin is set to 0 after each clock pulse, then there is not a problem is the LPT port cable is disconnected and reconnected again!
Thanks a lot.
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top