# is there a way to relate a frequency to other frequency by some circuit or mcrocontroller

A circuit that outputs a fraction of the input frequency controlled by some micro-controller or electronic circuit or component.

Say I am feeding the said circuit f-in( say 2KHz) and the circuit outputs

f-out = (1/4)*f-in ( implies 500Hz). Is there some way to do this

I couldn't find anything on google, so I came here. so,please guide me in the right direction

• Flip flops can divide easily by powers of two. There are also specialized divider ic devices. You really couldn't search for a clock divider? – jonk Dec 25 '16 at 10:04
• For a general relationship you can use a combination of dividers and a Phase Locked Loop (PLL). No micro-controller needed, but most modern micro-controllers contain such a circuit for generating their clock from a (generally lower-ferquency) crystal. – Wouter van Ooijen Dec 25 '16 at 10:33
• @jonk, I didn't know that a thing such as clock dividers exists – user94963 Dec 25 '16 at 11:59

To get started you will want to search on "divider circuit", "frequency divider", "frequency synthesizer", "counter circuit", "divide-by-N circuit" and maybe "flip-flop". Also, take a look at a data sheet for a "74HCT93" integrated circuit. Search on www.digikey.com for this. It is a very simple "4 bit binary counter" which will divide an input square wave by 2,4,8 & 16.

Be aware that most divider circuits operate on logic level signals. These are square wave signals by definition. So, they are of limited utility. Dividing other wave shapes and maintaining their shape is a much more difficult design task, something you will need a DSP (Digital Signal Processor ) or a PLL (phase-locked-loop" ) to perform.

Even in the realm of logic level dividers (e.g. the 74hct93 mentioned above) there are hard limitations of functionality. For example, there are many ICs available to divide by powers of 2 (2,4,8,16,32,64, etc.), and a few for non-binary integer numbers( e.g. 7490 on DigiKey) . Dividing by a non-binary number (3,5,6,7, 4922, etc.) is the domain of a CTC (counter timer circuit). CTC's (often simply called "timers") are included in most micro-processor ICs. There was a time when they existed as individual ICs, there may still be some out there.

Consider yourself "guided". Good Luck.

Some fractions are easier to make than others.

For 1/N, where N is an integer, only requires a digital divider.

If N is of the form $2^p5^q$ then it's particularly easy, as you can buy binary and pentary dividers and simply cascade them. HC390 contains $2^25^2$ and HC393 for $2^8$. Use HC163 and some trivial programming to get factors of N in the range 2 to 16, or slightly more complicated to get any N.

If the frequencies are low enough, then you can program a microcontroller to do any division for you.

If you want to make a rational fraction, then things get trickier, and you will want to start by using a PLL to multiply your incoming frequency by some factor, before dividing it. This only really works well for small factors.

If you want an arbitrary general rational, then use a PLL to get a higher frequency, and clock a DDS with it. You can control the DDS with an arbitrarily (limited only by available RAM) long fraction to generate almost any frequency you want.

• I'll look into the DDS. Thanks for guiding me in the right direction – user94963 Dec 25 '16 at 12:03