# Why wont me counter stop at 00

#### RamJam

Joined Apr 11, 2016
8
Hi all

Been working on a side project for a while and part of it requires a counter to count down from 30 to 0 then stop, however i cannot for the life of me work out how to make it stop at 00, instead of cycling over back to 99.

So my question is what logic do i need to make it stop counting at 00.

#### Attachments

• 79.4 KB Views: 22

#### bertus

Joined Apr 5, 2008
21,944
Hello,

You do not have a stop circuit.
When the counter reached 00, the circuit should prevent the clockpulses from going to the counters.

Bertus

#### RamJam

Joined Apr 11, 2016
8
Hello,

You do not have a stop circuit.
When the counter reached 00, the circuit should prevent the clockpulses from going to the counters.

Bertus
Hi Bertus,

What would you recommend for this, I've tried various logic but cannot work out the correct combination for the stop circuit.
Do you have any recommendations of where to take the inputs for the stop circuit from? The hex display input?

RamJam

#### Dodgydave

Joined Jun 22, 2012
10,365
When the counters get to zero, you need to detect this and hold the clock pin low, or take the reset pin 9 high.

#### bertus

Joined Apr 5, 2008
21,944
Hello,

You could make a flip-flop that goes to a gate that allows the clockpulses to enter the counters.
One side of the flip-flop will have the start signal.
The other side the stop signal, when the counter has reached 00.

Bertus

#### AnalogKid

Joined Aug 1, 2013
10,096
First, U2 CO (Carry Out) is tied to ground. This pin is an output, and this will eventually cause the chip to fail.

Also, U2 CO looks like the key. It goes low when all preceding digits are zero. With one external gate, this signal can inhibit clock pulses when the display reads 00.

The datasheet does not have a table that indicates how this output is affected by the Reset input, but from the internal logic diagram it looks like it is not. So another method might be connecting the CO output to the Reset input through an inverter. This might latch the counter inhibited at 00. Of course, then how do you unlatch it for more counting?

Both methods might have a race condition problem. If so, then you will need an external FF between CO and either the Reset input of a clock gate..

ak

#### RamJam

Joined Apr 11, 2016
8
Okay so ive got the circuit to stop at 0 and reset on a push button, brilliant, however i want to display on a seven segment instead of the generic Hex display.
Ive set up an BCD decoder to 7 segment display, and it displays all numbers correctly apart from decimal 0, why is this? it count down from 30 on the display apart from when 0 is meant to be displayed the display is blank.

Any ideas on why its doing this?

RamJam

#### Attachments

• 171.9 KB Views: 9