frequency divider confusion

Thread Starter

mdidomenico

Joined Mar 3, 2019
18
i'm a little confused over dividers. what i'm attempting to do (which probably wont work), is take a 16mhz quartz crystal oscillator and divide it down to a 200khz signal. i believe i can do this with divider IC chips, but i'm unclear about the nature of the output from the data sheets for the various chips. its unclear to me with something like a 12-bit divider, if the resulting 1-12 outputs are freq/[1-12] or if it's freq/(2^[1-12])

it's 80 steps from 16mhz to 200khz, if it's the first i'm presuming i can chain a 10bit into an 8bit and get the 80 steps, but if its the second, i'm a little stumped if there's a way to get from 16->200 with powers of 2

if anyone can explain or point me towards a tutorial that explains things more clearly that would be great. thanks.
 

AlbertHall

Joined Jun 4, 2014
12,622
You can't do it with only powers of 2 divide.
You could do this with a 4 stage power of two divider, which will give you 1MHz, followed by a divide by 5. A CD4017 could give you a simple divide by 5.
 

MrChips

Joined Oct 2, 2009
34,667
As long as the divisor is an integer value it can be done.
80 is 16 x 5.
Divide by 5 first followed by 16
or 10 followed by 8.
 

Thread Starter

mdidomenico

Joined Mar 3, 2019
18
As long as the divisor is an integer value it can be done.
80 is 16 x 5.
Divide by 5 first followed by 16
or 10 followed by 8.
this is where my confusion lies. i understand in decimal i can divide 16/80 and .200, but my limited noob understanding is that dividers talk in powers of 2. so if i do 16/(2^10)+(2^8), i get 256.

it's likely that my math and/or my understanding of how this works is wrong. i haven't been able to find/understand any tutorials on the net that explains clearly
 

AnalogKid

Joined Aug 1, 2013
12,076
its unclear to me with something like a 12-bit divider, if the resulting 1-12 outputs are freq/[1-12] or if it's freq/(2^[1-12])
freq/(2^[1-12]). If you look at the internal schematic of almost any binary counter (CD4020, 4024, 4040, 4060, etc.), you will see that it is a *series* of divide-by-two stages.
it's 80 steps from 16mhz to 200khz, if it's the first i'm presuming i can chain a 10bit into an 8bit and get the 80 steps, but if its the second, i'm a little stumped if there's a way to get from 16->200 with powers of 2.
You can't, directly. You can use a 7-bit counter/divider, decode 80 with an AND gate, and apply that signal to the Reset input; note that the 200 kHz result might not be a symmetrical (50/50) square wave.

Or, as above, you can use an off-the-shelf divide-by-10 part like the 7490 in series with any binary counter of 3 bits or more. This method will produce a 50/50 output.

Or, start with a 12.8 MHz clock and divide by 64:

https://www.digikey.com/products/en/crystals-oscillators-resonators/oscillators/172?k=&pkeyword=&sv=0&pv71=60&pv71=956&pv71=85&sf=0&FV=1f140000,mu12.8MHz|2150,ffe000ac&quantity=&ColumnSort=1000011&page=1&stock=1&pageSize=500

ak
 
Last edited:

MrChips

Joined Oct 2, 2009
34,667
You can design hardware counters that will divide by any integer value.
For divide by 10 there are lots to choose from. You can use 4017, 4160, 4162, 4510 decade counters (to list a few).
Use a binary counter to divide by any power or 2.
 

djsfantasi

Joined Apr 11, 2010
9,237
The trick in using binary counters that divide by anything other than a power of two was in AnalogKid’s post. You have to use additional, external logic gates to decode the count you want and also reset the counter. For example to divide by five with any counter, you AND bits one and three and reset the chip.
 

AnalogKid

Joined Aug 1, 2013
12,076
OR, taking a hint from MrChips, use a CD4017; it has the decoding built in. For example, to divide by 80 you can use two 4017's in series. If you set the first one to count by 8, and the second one to count by 10, the carry output will be a symmetrical (50/50) square wave.

ak
 
Top