#### NickLaris

Joined Jul 18, 2013
7
HI everyone. I am new here so i decided to get in action right away....
I am beginner in digital design and i have some questions...
I got a homework about 24-hour digital clock which is showing seconds minutes and hours. I have a problem with the counter which i must use in hours (24).
i saw somewhere in this forum that 24-h clock has mod 2 counter but i cant understand that cause the mod-2 counter counts 0,1 not 2.... am i right? and if so the right counter is a mod-3?? Plz answer as soon as possible cause i have this project for tomorrow morning ))) thanks for your time

#### WBahn

Joined Mar 31, 2012
27,893
If you want the hour counter to run from 0 to 23, what modulus would you want to use?

Keep in mind that treating each digit as a separate counter can work for the seconds and minutes because the least significant digit ALWAYS runs 0-9 while the next significant digit ALWAYS runs 0-5.

But what about the least significant digit of the hours.

Perhaps in the future you might not want to put off starting this until the night before it is due.

#### NickLaris

Joined Jul 18, 2013
7
Hey there. First of all thanks for your relpy.
Look.. in my task i have to treat each digit as a separate counter in hours so i was thinking about using a mod-3 and then using some gates to reset the clock when 24 appears.

#### WBahn

Joined Mar 31, 2012
27,893
A mod-3 counter counts 0..1..2..0..1...

So how are you going to use that to count to 24?

We are not mind readers. We cannot tell you where are going right and where you are going astray unless you tell us where you are going.

Last edited:

#### ScottWang

Joined Aug 23, 2012
7,306
24 hrs - 23:59:59, this is the max numbers for the clock.
Xtal 32768hz, CD4060,CD4013,CD4518,CD4511 and AND gate.
Divide Hour by 24, divide Minute by 60, divide Second by 60.

#### NickLaris

Joined Jul 18, 2013
7
i have in mind that a mod 3 counter counts 0..1...2 but with the 3 its going immediately to 0 so we cant see that. And thats why we use it and with some gates. For example if i ll take Q1(which is the decades of hours, 0,1,2-MSB) and N2(output of ff)(which is the 0-9 from hours-left from MSB) , as inputs in a NAND and then use her output as CLEAR(not). Q1 will be 00=0 , 01=1 , 10=2
and N2 0100=4 . hope u understand

Last edited:

#### WBahn

Joined Mar 31, 2012
27,893
Yes, I was thinking mod-4 when I typed the sequence. My aologies. I've corrected it.

And, no, I do not understand.

What do you mean take Q0 and Q2 as inputs in a NAND?

Q0 is 2 bits and Q2 is four bits. So are you talking about taking all six of these bits and putting them through a 6-input NAND gate?

A NAND gate is HI except when ALL of its inputs are HI. Neither Q0 nor Q2 satisfy this condition by itself, let along together.

What signals, EXACTLY, are you planning to NAND together?

#### NickLaris

Joined Jul 18, 2013
7
i ve also corrected my thought... hope now u ll be able to understand it

#### WBahn

Joined Mar 31, 2012
27,893
Not by much, but it is moving in the direction I thought you were headed.

Try this description:

The hours consists of two counters, one for the least significant digit and one for the most signiificant digit. In order to reset the hours to zero as soon as it reaches 24, you want to use bit-2 of the most significant digit and bit-1 of the least significant digit and NAND them together to generate an active-LO reset signal.

This approach will work, but only by coincidence.