PDA

View Full Version : How can I divide the frequency

peterlan
09-13-2008, 03:09 PM
Hello everybody, I am doing a project on building a digital clock. Now I have the crystal oscillator 4Mhz already. I would like to know how to divide the frequency to 1 hz since the clock of the digital clock need to be 1 Hz. Anyone who has some idea plz tell me?
PS. I have found some IC's that can divide the frequency ;74HC390 which can divide up to 100 but i still dont know how it work.Moreover I've found some circuit like this
http://www.elecfree.com/electronic/xtal-oscillator-frequency-by-74ls04/ .

Pete

hgmjr
09-13-2008, 03:16 PM
Ordinarily, if you don't intend to achieve a resolution below 1 second, you would start with a much lower frequency oscillator. 32,768 Hertz seems to be a popular starting frequency. The crystals that are available at this frequency abound. The nice part about starting with this frequency since it is equal to 2 raised to the seventh power is that it is easily divided down using a commonly available counter IC.

hgmjr

peterlan
09-13-2008, 03:20 PM
:)Thank you for your advise, However, i still want to know how can it be done?

hgmjr
09-13-2008, 03:24 PM
A frequently used IC for this purpose is the CD4040 (http://www.national.com/ds/CD/CD4020BC.pdf#page=1) which is a 12-bit counter/divider.

hgmjr

peterlan
09-13-2008, 03:41 PM
Furthermore, hgmjr
Can I use the real time's DS1007 just like you suggest a guy to do a stop watch

hgmjr
09-13-2008, 03:43 PM
Furthermore, hgmjr
Can I use the real time's DS1007 just like you suggest a guy to do a stop watch
I think the DS1007 is a silicon delay line.

Did you perhaps mean a DS1307?

hgmjr

peterlan
09-13-2008, 03:53 PM
Yep I type it wrong

hgmjr
09-13-2008, 03:55 PM
You can use a DS1307 but then you would need a microcontroller to set it up using the I2C interface.

I got the impression from your initial post in this thread that you were looking for a non-microcontroller based digital clock design.

hgmjr

SgtWookie
09-13-2008, 05:01 PM
A frequently used IC for this purpose is the CD4040 (http://www.national.com/ds/CD/CD4020BC.pdf#page=1) which is a 12-bit counter/divider.

I believe you meant to refer to the CD4060, as it's better suited for operating with a crystal. It has 14 divider stages instead of 12.

OnSemi has better documentation on their MC14060B, an equivalent to the CD4060B: http://www.onsemi.com/pub/Collateral/MC14060-D.PDF

hgmjr
09-13-2008, 05:04 PM
The 4060 may well be a better choice under the circumstances.

Thanks,
hgmjr

nanovate
09-13-2008, 05:05 PM
I got the impression from your initial post in this thread that you were looking for a non-microcontroller based digital clock design.If the OP can use a microcontroller then the division would be a simple programming task.

SgtWookie
09-13-2008, 05:36 PM
I agree, a microcontroller would be the way to go.

However, if the OP insists on using a 4MHz frequency source, the attached divider circuit would get them down to 1kHz, or 1/1000 of a second clock increments. Adding another pair of 4518 stages would get them down to 1/10 second.

If they're using a crystal, the AND gate could be replaced with a 4093 quad Schmitt-trigger NAND; use two as the crystal driver & buffer, and two to build the functionality of the AND gate.

hgmjr
09-13-2008, 05:38 PM
I too agree that a microcontroller would be the way to go.

The added flexibility and additional functionality could prove very valuable in the end.

hgmjr

peterlan
09-14-2008, 03:30 PM
thx verymuch for every body for any suggestion. Actually,I also want to use the microcontroller but I don't have the knowledge on that much and I think I have only one week to do this project. However, i really thanks for every suggestion .

Ah I have a question Depend on this
"the attached divider circuit would get them down to 1kHz, or 1/1000 of a second clock increments. Adding another pair of 4518 stages would get them down to 1/10 second.

If they're using a crystal, the AND gate could be replaced with a 4093 quad Schmitt-trigger NAND; use two as the crystal driver & buffer, and two to build the functionality of the AND gate."

If I do according to the attached i'll get the clock as 1/10 second , I need to divide by 10 another time right? Or not?

hgmjr
09-14-2008, 03:46 PM
Since your target frequency is 1 Hertz you will need the additional dividers to get there.

If your interest is inclined toward microcontrollers, I would suggest that you make a commitment to become familiar with the subject as soon as it is convenient for you to do so.

hgmjr