A 6 Digit Frequency Counter

dl324

Joined Mar 30, 2015
18,333
Here is a timing diagram. I believe that on the first rising edge the latch must occur.
That's not going to do what you want. Now try drawing a timing diagram that will.

You want the CD4511 to be latched until the end of a counting cycle. At that time, you want to disable the latch, then latch the current count. Then reset the counter and count for another cycle.
 

MrChips

Joined Oct 2, 2009
34,823
I think the confusion stems from the meaning of the word “latch”. The word can be given two meanings that are in fact opposite.

On the CD4511 datasheet, pin-5 is given two names, LE and /STROBE.
Using the /STROBE function, pin-5 must remain HIGH and only given a short pulse to LOW and HIGH again. This is made clear in the truth table.

In other words, invert your LATCH signal.
 

Thread Starter

maker_2023

Joined Nov 20, 2023
199
I think the confusion stems from the meaning of the word “latch”. The word can be given two meanings that are in fact opposite.

On the CD4511 datasheet, pin-5 is given two names, LE and /STROBE.
Using the /STROBE function, pin-5 must remain HIGH and only given a short pulse to LOW and HIGH again. This is made clear in the truth table.

In other words, invert your LATCH signal.
I tried to pull the latch signal off of pin#4 of U1 and which would invert the latch signal
and it still doesn't work. Something else that doesn't make sense is if I connect the
ground lead from the function generator to the circuit ground, the input signal stops.
I am really getting frustrated with this stuff.
M
 

MrChips

Joined Oct 2, 2009
34,823
I tried to pull the latch signal off of pin#4 of U1 and which would invert the latch signal
and it still doesn't work. Something else that doesn't make sense is if I connect the
ground lead from the function generator to the circuit ground, the input signal stops.
I am really getting frustrated with this stuff.
M
"it still doesn't work"

Your oscilloscope is your "eyes" into everything electronic. Use it to diagnose what is happening.
 

dl324

Joined Mar 30, 2015
18,333
Something else that doesn't make sense is if I connect the
ground lead from the function generator to the circuit ground, the input signal stops.
Ground from the function generator should have always been connected to your circuit.

It's time for you to post a diagram showing how things are wired.
I am really getting frustrated with this stuff.
You have an oscilloscope. You should be able to probe the circuit to determine what isn't working. I did electronics as a hobby for decades without having a scope or function generator. I used an analog VOM and a logic probe.
 

Thread Starter

maker_2023

Joined Nov 20, 2023
199
Ground from the function generator should have always been connected to your circuit.

It's time for you to post a diagram showing how things are wired.
You have an oscilloscope. You should be able to probe the circuit to determine what isn't working. I did electronics as a hobby for decades without having a scope or function generator. I used an analog VOM and a logic probe.
Yes, the ground should be connected but the circuit refuses to count when it is connected. That
seems to be ridiculous. I posted the schematic and a photo in post #73 but no one responded to it!
 
Last edited:

dl324

Joined Mar 30, 2015
18,333
I posted the schematic and a photo in post #73 but no one responded to it!
I think you man post #72. That schematic was incomplete. It doesn't show how the function generator is connected. It also doesn't give pin function for the counters. I've used CD4510, but not often enough to have pin functions memorized.
 

Thread Starter

maker_2023

Joined Nov 20, 2023
199
I think you man post #72. That schematic was incomplete. It doesn't show how the function generator is connected. It also doesn't give pin function for the counters. I've used CD4510, but not often enough to have pin functions memorized.
No it is not incomplete. The function generator is connected to "Frequency Input". Use a data sheet. In fact just don't bother responding to my posts if you can't be civil!
 

Thread Starter

maker_2023

Joined Nov 20, 2023
199
You have to be careful here.
Both LATCH ENABLE and RESET are not edge sensitive. They are level sensitive.
This means that the RESET function is in effect for the entire time that the RESET signal is active.
Similarly, LATCH ENABLE is active for the entire time that the LATCH ENABLE is active. Therefore the important event occurs when the LATCH ENABLE signal goes inactive. Pay attention to the logic level of LATCH ENABLE on CD4511. It has to be HIGH most of the time and then pulse LOW-to-HIGH to latch the data.
Hi:
Why can't someone just show me a circuit that will work. After I get it working I can study it
and find out why it works and why the other attempts did not work. I will be in a nursing
home before I get this figured out.

M
 

MrChips

Joined Oct 2, 2009
34,823
Yes, the ground should be connected but the circuit refuses to count when it is connected.
For now, you have to ignore that "the circuit refuses to count when it is connected".
Again, please use your oscilloscope for testing. When things don't work, take it as an opportunity to hone your trouble-shooting skills. We all learn something when things don't work. It is educational to discover for yourself why something is not working.
 

Thread Starter

maker_2023

Joined Nov 20, 2023
199
For now, you have to ignore that "the circuit refuses to count when it is connected".
Again, please use your oscilloscope for testing. When things don't work, take it as an opportunity to hone your trouble-shooting skills. We all learn something when things don't work. It is educational to discover for yourself why something is not working.
My scope doesn't even measure the 1 hz clock.
 

Thread Starter

maker_2023

Joined Nov 20, 2023
199
That is not correct. Your scope can be used much below 1Hz.
But you are trying to find why there is no signal from the function generator. Set the function generator to 1000Hz.

1) If I connect the scope directly to the function generator it measures any signal 10Hz and higher. The ground is connected.
It does not recognize any frequency below 10 Hz.
2) When I connect the counter to the function generator it will count no matter what the frequency is but not when the
ground is connected.
 

MrChips

Joined Oct 2, 2009
34,823
1) If I connect the scope directly to the function generator it measures any signal 10Hz and higher. The ground is connected.
It does not recognize any frequency below 10 Hz.
2) When I connect the counter to the function generator it will count no matter what the frequency is but not when the
ground is connected.
I am not asking if your circuit counts or not.
I am asking you to use your oscilloscope to verify than any signal voltage and frequency at every test node is present and correct as expected.

My oscilloscope works even below 0.001Hz.
 

Thread Starter

maker_2023

Joined Nov 20, 2023
199
I am not asking if your circuit counts or not.
I am asking you to use your oscilloscope to verify than any signal voltage and frequency at every test node is present and correct as expected.

My oscilloscope works even below 0.001Hz.
If it does why does it not register on the screen?
 

sarahMCML

Joined May 11, 2019
697
I don't know. What are your oscilloscope settings?
Hi:
Why can't someone just show me a circuit that will work. After I get it working I can study it
and find out why it works and why the other attempts did not work. I will be in a nursing
home before I get this figured out.

M
I can show you a modification of your circuit that will do what you ask, but will you learn to troubleshoot the existing one if I do? You might need to change the existing I.C to get it to work properly, or you could try it with the one you have, it wouldn't be optimal but it does work.
But you really need to use your scope to understand it.
 

MrChips

Joined Oct 2, 2009
34,823
Hi:
Why can't someone just show me a circuit that will work. After I get it working I can study it
and find out why it works and why the other attempts did not work. I will be in a nursing
home before I get this figured out.

M
You are going to keep coming back with the same question: "Why doesn't my circuit work?"
You need to step away from your circuit and learn to use your oscilloscope and develop your own trouble-shooting skills.

Step #1 - With no signal connected to the input of the oscilloscope, learn to set it up so that there is a trace on the screen at every Horizontal Time setting. After that, experiment with different frequency signals from your function generator, including signals slower than 1Hz.

Step #2 - Go back to post #37 and do the exercises I posted.
 

sarahMCML

Joined May 11, 2019
697
Since it's basically a rework of MrChips circuit in post #37, I'll put my modification to the existing Latch/Reset circuit here now.


Latch_Reset.jpg
It works just as well with the CD4011 but the time constants are shorter with 10k and 10pF timing components!
Scope shot follows.

Latch_Reset.png

Blue is the input signal (~1KHz for ease of scoping), yellow is Latch, and Magenta is Reset pulse. This is with a CD4011 I.C.
 

MisterBill2

Joined Jan 23, 2018
27,557
I think you man post #72. That schematic was incomplete. It doesn't show how the function generator is connected. It also doesn't give pin function for the counters. I've used CD4510, but not often enough to have pin functions memorized.
I am responding, and what I see is mostly a wiring diagram, with no hint of the function associated with a pin number, except for the start of the time base portion below. That makes the operation much more difficult to follow or understand.
There is a simpler way to provide the various functions of 1 close input gate, 2 latch new count, 3 reset counter to zero, 4 reset time base counter, 5 open input gate to start counting. Use a CD4017 to generate the signals in sequence, with the 4017 clocked by the time base oscillator.
 
Top