Author Topic: Controlling a CD4026 based counter externally  (Read 4177 times)

0 Members and 1 Guest are viewing this topic.

Offline DBoulangerTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: ca
Controlling a CD4026 based counter externally
« on: February 08, 2014, 05:30:56 am »
Good day,

Sooner or later, most electronics enthousiasts will end up with some sort of counter in their toolbox.

More recently, some people, including myself, were talking about some CD4026 based counters.

Quite a few discussions were covering switch debouncing using a 555 or some mixture of NAND and/or NOR gates, which is really good.

However, where I kind of feel there is a little weakness, is the way the counter gets started or stopped.  Most circuits I saw so far imply that we manually toggle a switch to engage or pause the circuit, or even potentially turn on and turn off the clock signal feeding the counter.

But globally, what can be done, circuit wise, to actually control when the counter will start and or stop ?  (Excluding manual intervention, of course.)

Obviously I overlooked at something, so I definitely need some help to complete my little project.  At first glance, a way to control the CLK INHIBIT would be nice, although I don't know for sure if the signal I'll be using to start/stop the counter will be high or low to start with.

The only thing that can be taken for granted is the fact that there will be a logic transition, either from LOW to HIGH, or from HIGH to LOW, at a given point on a circuit that can be used as a reference.  To make the things even more interesting, two reference points could be used to control the counter, so for example, point A can go HIGH, indicating that we need to start the counter, then later point B get HIGH as well, and then the counter must stop, showing the count between the two events.  Keep in mind that the logic states of points A and B are known only at the very last moment, so the start and stop logic states can be either LOW or HIGH.

So with minimal components, how would you proceed to start/stop the counter externally based on the description above ?

Regards.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Controlling a CD4026 based counter externally
« Reply #1 on: February 08, 2014, 12:44:42 pm »
Quote
But globally, what can be done, circuit wise, to actually control when the counter will start and or stop ? 

It depends on the counter used. Some of two inputs so one can be used to "disable" the real input. Others have master resets or inhibit, which can be used to stop / start the counter.

If you link the output to one of those pins, you can stop / start / reset the counter after certain counts, etc.

Quote
(Excluding manual intervention, of course.)

What does that mean?
================================
https://dannyelectronics.wordpress.com/
 

Offline DBoulangerTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: ca
Re: Controlling a CD4026 based counter externally
« Reply #2 on: February 08, 2014, 09:32:03 pm »
Let me explain my goal,

I have boards on which there are CD4026s, resistors and digits led displays.  I've setup the boards in such way that they can be chained in order to obtain a counter with more digits, so in the case of the CD4026's, the CARRY OUT (pin 5) of the least significant digit is feeding the CLOCK (pin 1) of the next most significant digit and so on.  So far, I have two boards, each one of them having 6 digits each, which can be used as 2 seperate 6 digits counters or as a single 12 digits counter.

The DISPLAY ENABLE OUT (pin 4) of the least significant digit is feeding the DISPLAY ENABLE IN (pin 3) of the next lesser significant digit and so on.

All the CLOCK INHIBIT (pin 2) are interconnected between the different counters, thus allowing to pause all of them at once.  The RESET (pin 15) is also interconnected between the different levels, to reset to zero all off them by pressing a button.

As a little extra, I added two small features.  The first one is a missing pulse circuit which sets the CLOCK INHIBIT to HIGH (pause counters) along with the DISPLAY ENABLE (showing digits if they weren't previously shown), thus showing the digits while pausing the counters if the input clock signal stops (in the actual setup the elapsed time before considering the clock signal  is set to 1.5sec).  Also, if the DISPLAY ENABLE is LOW (digits not shown), along with the CLOCK INHIBIT (counters running normally), I'm setting the CLOCK INHIBIT and RESET of a CD4017 to LOW, which is activating a led chaser using the "decimal points" of the digits led displays.  So when the counters are running, but the numbers aren't displayed, the decimal point chaser is engaged, as long as the necessary conditions are met, conditions driven by the status of the DSPLAY ENABLE and the CLOCK INHIBIT (which optionally follows the missing pulse status).

The final element I need to add is some sort of external control that will allow the counter to start and stop based on a given signal(s), which can be LOW or HIGH.  The START and fhe STOP signals can be read from the same point on the circuit being tested, or can be read from 2 different points.  Also, either point can LOW or HIGH.

For example, the START signal is connected to point A.  The STOP signal is connected to point B.  The control could be set in such way that the START signal is established when point A goes LOW and the STOP signal could be set when point B goes HIGH.  So based on the knowledge of the circuit being tested, the counter is to be set to react to the START and STOP events in relation with what we decided would trigger these events, either a LOW or HIGH logic state.

So what I meant by controlling the counters externally, but not manually, is actually being able to Start and Stop the counters via events happening on point A and point B of a tested board.  Starting/Stopping the counter via a push button, is somewhat defeating the purpose under some circumstances.  For example, everything is done to ensure that we have an as precise as possible clock for the counter, so that we can use the counter as a timer, but we have to manually press a button to either start or stop the counter.  I don't think adding the human reflex time in the counted clicks is actually something we want, or is it ?

To some extent, I have to admit, I might be overdoing the things a bit on this project, however my personnal approach is when I try do do something, I try to do it the right way and whenever possible, I really enjoy adding some "extras".

Hopefully you'll get a better idea of what I attempt to do.

Bye for now.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Controlling a CD4026 based counter externally
« Reply #3 on: February 08, 2014, 10:11:32 pm »
I must have missed something. Isn't it as simple as using the inhibit pin? Or if you want, use a NAND gate on the clock signal.
================================
https://dannyelectronics.wordpress.com/
 

Offline DBoulangerTopic starter

  • Regular Contributor
  • *
  • Posts: 56
  • Country: ca
Re: Controlling a CD4026 based counter externally
« Reply #4 on: February 08, 2014, 10:52:09 pm »
Hi Danny,

The CLOCK INHIBIT pin will indeed Start/Stop the clock.  When it is LOW, the counter increments of the CLOCK signal.  When CLOCK INHIBIT is HIGH, the counter is paused, thus the counter is not advancing on the CLOCK signal.

As you can see, the CLOCK INHIBIT must be HIGH to pause the counter, however the test point on the board might be LOW and under these circumstances, I would need to invert the signal so that when the test point will become HIGH, the resulting invertion LOW will feed the CLOCK INHIBIT, thefore the counter would start.  However, if the signal at the test point is HIGH to start with and I want to start the counter when it changes, then I can feed it directly to the CLOCK INHIBIT.

In that case I must check if the signal needs to be inverted first to feed the CLOCK INHIBIT correctly.  This is this checking step which isn't obvious for me and how to incorporate it with the actual circuit.  Keep in mind that during the counting process, the clock might also be inhibited manually before the stop request has been issued, therefore I need to combine the "automated" CLOCK INHIBIT with the manual one as the manual one can superseed the "automated" way of doing it.

I will need to re-evaluate my truth table and see if I can manage toggling the clock input at will.

Sorry for the confusion.  Perhaps I'm too close to the finish line, not realizing what I have is actually doing the trick.

Thanks for your time.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Controlling a CD4026 based counter externally
« Reply #5 on: February 08, 2014, 11:03:45 pm »
If you don't know if the signal at the test points are active high or active low, then you have no way to figure out how to start / stop it.

Your issue isn't to figure out how to start / stop the counter. Your issue is to figure out what signals you are getting. After that, you may try to figure out how to use that signal to start / stop your counter.
================================
https://dannyelectronics.wordpress.com/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->