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.

Digital Clock Design

Status
Not open for further replies.

Deathshead

New Member
Does anyone have any schematics of a digital clock design? ( Secs. Mins. and Hours) I wanna see exactly how each one is clocked by one another. I have to display seconds, minutes, and hours. I am designing this on Altera Max Plus.
thnx
 

panic mode

Well-Known Member
If you want to use TTL or CMOS chips, it's all same.
You have bunch of counters that are cascaded.
First you have counter for 10 (seconds),
then you have it's output going into counter by 6 (seconds x10),
then this goes to another counter by 10 (minutes) then its
output goes into one more counter by 6 (minutes x10) etc.
If you look at clock, you see format HH:MM:SS but in reality
signal goes from A to B to C to D to E to F in reversed
order FE:DC:BA (it's from right to left).
 

Attachments

  • clock_835.gif
    clock_835.gif
    2.4 KB · Views: 737

Deathshead

New Member
TTL,

I've already designed the seconds using binary counters (mod 6 and Mod 10 ) each going into 7 segment displays. The "seconds" design was succesfull, i clocked it with 1hz. and it did the expected operation ( 0-59)
The "minutes" design will be the same as the "seconds" except im kind of confused as to how do i make the "seconds" clock the "minutes"
 

Deathshead

New Member
ok so, the output of the mod-6 counter ( for the seconds) goes into the input of the mod-10 for the minutes counter, then to the six, and the output of that into the hours?
 

ljcox

Well-Known Member
You need a carry signal that changes when the seconds counter increments from 59 to 0. Use this to clock the minutes counter.

You may need an inverter. eg. if the minutes counter needs a positive edge, and the seconds carry signal is a negative edge, you will need an inverter.

Len
 

panic mode

Well-Known Member
Note that decoding for hours is a bit different. The highest digit ("F") can be decoded using AND gate of bits 1 and 3 (assuming you have 4-bit counter with outputs Q0-Q3). Buffer bits 1 and 3 that go to 7-segment decoder and use the signal from the AND gate we just mentioned
to switch them to "0".
 

ljcox

Well-Known Member
Deathshead said:
ok so, the output of the mod-6 counter ( for the seconds) goes into the input of the mod-10 for the minutes counter, then to the six, and the output of that into the hours?

Yes
 

panic mode

Well-Known Member
If you use same type of counters, you don't have to worry about this.
They all should be clocked with same edge. If you want to play safe,
breadboard it and experiment. This is always safest approach.
 

ljcox

Well-Known Member
Digital clock

The most significant bit of the seconds counter will change from high to low when the count changes from 59 to 0. Use this as the carry signal.

So if the minutes counter increments on negative edges, then you don't need an inverter.

Len
 

Gandledorf

New Member
Perhaps I am missing something here... but why not just do it with a uC? Clock it with a 3.2768MHz crystal, it divides down to even time increments. Set your prescaler on your timer to divide by 1024, and then initialize your timer to count up from 190 to 255. Generate an interrupt on timer overflow, and on interrupt increment a subsecond counter. When it reaches 25, reset it, and increment your seconds counter.

When seconds reach 60, reset, increment minutes, etc, etc, etc.
 

Deathshead

New Member
Gandledorf said:
Perhaps I am missing something here... but why not just do it with a uC? Clock it with a 3.2768MHz crystal, it divides down to even time increments. Set your prescaler on your timer to divide by 1024, and then initialize your timer to count up from 190 to 255. Generate an interrupt on timer overflow, and on interrupt increment a subsecond counter. When it reaches 25, reset it, and increment your seconds counter.

When seconds reach 60, reset, increment minutes, etc, etc, etc.

Well thanx for the advice but im doing this for school and im simply using an altera board and breadboard as well as a few 7- segment displays, its just a project
 
Status
Not open for further replies.

Latest threads

Top