# Why wont me counter stop at 00

Discussion in 'Homework Help' started by RamJam, May 14, 2016.

1. ### RamJam Thread Starter New Member

Apr 11, 2016
8
0
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.

• ###### 30 to 0 counter.jpg
File size:
79.4 KB
Views:
19

Apr 5, 2008
15,806
2,389
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

3. ### RamJam Thread Starter New Member

Apr 11, 2016
8
0
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

4. ### Dodgydave AAC Fanatic!

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

Apr 5, 2008
15,806
2,389
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

6. ### AnalogKid Distinguished Member

Aug 1, 2013
4,701
1,300
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

7. ### RamJam Thread Starter New Member

Apr 11, 2016
8
0
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

File size:
171.9 KB
Views:
8
8. ### RamJam Thread Starter New Member

Apr 11, 2016
8
0
Please ignore me I just noticed i had RBI set to low when it should be high, this was causing the error, all functioning correctly now.