Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to Make a Digital Clock

Status
Not open for further replies.

erictzhec

New Member
Design a digital clock with the following functions:
• Displays hours, minutes and seconds
• Indicates PM by displaying the decimal point
• Enables the setting of hours, minutes or seconds by having the display increment at a fast or slow speed and then stopping at the desired value
• Without using microcontroller and microprocessor
 
That's an interesting homework assignment.

How do you plan on doing it?
 
u have lot of specifications... i have a design but it uses microcontroller and without mc there will be no accuracy i guess...if u want i will share my project here...
 
Last edited:
I have a friend who accomplished this with digital gates, but his was a binary clock; good luck!
 
Last edited:
Hello,


Actually, making a digital clock without uC or uP in theory isnt too hard at all, but it does require a lot of ic packages. What is required is some counters like 74LS90 or similar, and those even have a gate or two built in so that you can get divide by 6 or whatever you need. You usually need at least one counter per digit, so for the seconds units that's one divide by 10, for the seconds tens that's one divide by 6, for the minutes units that's one divide by 10, and for the minutes tens that's another divide by 6, and for the hours you can use one divide by 12 or perhaps another way, with a special way to display this, and for the AM/PM a divide by 2 (flip flop) and that drives the AM/PM LED.
You can even get very good time keeping by using a zero cross detector circuit to sense the zero cross of the line frequency, and divide that by either 50 or 60 depending on where you live (50Hz or 60Hz). That's how many cheap clocks do it, but it's very accurate too.

So in block diagram form and a 60Hz line it would look like this:
Code:
LineIn-->ZeroCrossDetect-->DivBy6-->DivBy10-->(1 second time base)

(1 second time base)-->DivBy10-->DivBy6-->DivBy10-->DivBy6-->DivBy12-->DivBy2
                        ---SECONDS---      ---MINUTES---     HOURS     AM/PM
In the above, each DivBy (divide by) section is a counter that goes from 0 to N-1, so that DivBy10 is a counter that goes from 0 to 9 and back to 0, and DivBy6 is a counter that goes from 0 to 5 and back to 0. These kinds of counters are very easy to make with ic packages like 74LS90 and 74LS92 for example. You do need one ic package per digit, except with the DivBy12 which can use one package or else you'll have to do it a little differently.
As i was saying before too, if your input line is 50Hz then you need to replace the DivBy6 above by a DivBy5 stage instead.
Also note that the carry out of the previous stage feeds the clock input of the next stage.

To get the time set features, you can use a couple different methods. One way is to simply replace the 1 second time base (using a couple logic gates) with a much higher frequency pulse to set the AM/PM and hours, and a lower frequency pulse to set the seconds and minutes. Another way is to break the counter chain and inject lower frequency pulses into the counters to be set. These pulses are gated into the input of the counters using gates and switches that are debounced.

To drive the LED digits you'd have to use seven segment decoder ic packages, one for each digit, unless you use a multiplexing scheme but that's a bit more complicated.
 
Last edited:
I would start off with using a 32.768 KHz Watch crystal as it will divide down to exactly the time functions you need.
A handfull of counter chips, a few 7 seg driver chips and most of the work is done.

Pete.
 
yes, it's not that hard at all.
A clock is nothing more than a counter. To be more precise, it's a couple of counters with different bases that overflow into then next.

As mentioned above, start with an accurate crystal reference and work out how you need to divide it to get 1 second pulses.
From there this clocks a base 60 counter and so on. OR we can simplify it much further.

The one second pulses increment a base 10 counter. It overflows into a base 6 counter.
That overflows into another base 10 counter and it in turn overflows into another base 6 counter.
That overflows into a base 12 counter which overflows into a flip flop which indicates AM/PM.

There are a number of counter chips available, some of them will even output 7 segment display.
To increment (or decrement) the counters, inclusive or'ing the clock lines will do the job.
One on each of the base 10 counters.
Maybe one on the reset line for the seconds counters.
The slow/fast increment something like a 555 timer with some trickery.


I built something very similar for a Digital Electronics 1 project. I prided myself with making projects ultra simple.
I used 7 chips. My teach accused me of trickery (he wasn't the first or the last).
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top