creating a fast counter with low clock speed

Thread Starter

twistadias

Joined Aug 17, 2008
2
Im required to build a digital tone generator using Quartus. Theres only one clockl input with a speed of 1Hz.

Now I most part of the tune plays fine on 1Hz but I want to speed up the certain parts. The clock is connected to a counter which counts upto 31.

Is there a way to increase the counter speed on those certain parts say from number 10 to 20. the counter is a set of positive edge triggered D flip-flops connected together.

I was planning to create another counter which counts faster but I dont know how?

I cannot add another input at a higher clock speed.
 

mik3

Joined Feb 4, 2008
4,843
Firstly, you cant count faster unless you have a faster clock. If you want to count faster between 10-20 then make a circuit with logic gates to detect when you reach number 10, then this circuit will make your clock count faster or enable a second faster clock until it counts up to 20. Then the logic gates circuit will disable the fast clock and enable the slow clock and continue with counting.

It is better to use a microcontroller if you can, you save money and the circuit will be more compact.
 

beenthere

Joined Apr 20, 2004
15,819
Got any idea how the 1 Hz clock gets generated? It's very common to have a 1024 Hz oscillator somewhere and simply divide the frequency don to whatever lower freq you want.

If you have an oscillator somewhere, you might be able to grab a higher frequency from it for your faster clock. Having a schematic will give you that information, or you could also use an oscilloscope to trace the clock back to its source.
 

Papabravo

Joined Feb 24, 2006
21,159
The standard method of doing this is to use a phase locked loop. Assume you have a VCO (Voltage Controlled Oscillator). The output of this VCO is divided down by some factor like 10 or 20 and it is compared to your reference frequency(1 Hz.). Then you adjust the frequency of the VCO so that it has the same phase as the reference frequency.

Consider just the falling edges. If the divided VCO signal leads the reference then the VCO frequency is too high and needs to be lowered. If the reference leads the divided VCO then the VCO frequency is too low and the VCO frequency needs to be raised.

Clever Eh?
 

Thread Starter

twistadias

Joined Aug 17, 2008
2
The standard method of doing this is to use a phase locked loop. Assume you have a VCO (Voltage Controlled Oscillator). The output of this VCO is divided down by some factor like 10 or 20 and it is compared to your reference frequency(1 Hz.). Then you adjust the frequency of the VCO so that it has the same phase as the reference frequency.

Consider just the falling edges. If the divided VCO signal leads the reference then the VCO frequency is too high and needs to be lowered. If the reference leads the divided VCO then the VCO frequency is too low and the VCO frequency needs to be raised.

Clever Eh?
huh? that went over my head.

I'll ask my professor if I can add in an oscillator.

My idea was to create a counter that counts on both the rising and falling edges of the clock. Then use some of these counters in series thereby creating a fast counter.

Is there any way to do this? Or is there a website related to this kind of stuff?
 

John Luciani

Joined Apr 3, 2007
475
As was previously mentioned the phase-locked loop (PLL) is the circuit you want.
You place a divide-by-n counter in the feedback loop and your output frequency
is multiplied by a factor of N.

You should be able to do this with two ICs. Take a look at the 4046 IC. I believe that
TI, On-Semi, NXP and Fairchild still sell these. There are probably application notes
showing the divide-by-N counter. If you can make N a power of 2 (2,4,8,..) you can just
use a regular counter.

I believe "The CMOS Cookbook" by Don Lancaster has some PLL information.
For more detailed information checkout "Phaselock Techniques" by Floyd M. Gardner
ISBN 0471042943.

(* jcl *)

P.S. If you do the math for the loop filter your professor will probably give you extra
credit ;-)
 
Last edited by a moderator:
Top