Frequency divider

Thread Starter

anhnha

Joined Apr 19, 2012
905
Is there a frequency divider from flip flops that can generate a clock with an arbitrary number such as 20, 25 not just 2, 4, 8, 16, 32, 64,...?
 

Brownout

Joined Jan 10, 2012
2,390
Yes. You have to decode that counts that give you those ratios. For example, to get a divide by 20, you decode the binary value 10100. Use the output of the decoder to restart the count.
 

cmartinez

Joined Jan 17, 2007
8,220
Is there a frequency divider from flip flops that can generate a clock with an arbitrary number such as 20, 25 not just 2, 4, 8, 16, 32, 64,...?
I'm not sure, but you could obtain any number you like through the addition of any number that is a power of 2. Just like you can express any number using the decimal notation.
 

Brownout

Joined Jan 10, 2012
2,390
Thanks for the answers!

Could you explain a bit more?
For a simple example, consider a divide by three circuit. The output will be zero, one, two, zero, one, two, etc. An output will be generated each time the counter reaches two, so that output would be used to reset the count back to zero.

If you generate your divide by three using a two bit counter, there is no need to reset the count, it will be done automatically.
 

Thread Starter

anhnha

Joined Apr 19, 2012
905
Do you mean that we use the reset signal of counter as the created clock?
I see that the clock doesn't have a 50% duty cycle. How can I get a 50% duty cycle?
 

Lestraveled

Joined May 19, 2014
1,946
What you are describing is generally called a "divide by N" counter. A common chip used for this is a 74193 (TTL logic) programmable up/down counter. You load in the divide by number and clock the down pin. Do a google search for a 74193 or "divide by N counter", for more info.
 

Thread Starter

anhnha

Joined Apr 19, 2012
905
What you are describing is generally called a "divide by N" counter. A common chip used for this is a 74193 (TTL logic) programmable up/down counter. You load in the divide by number and clock the down pin. Do a google search for a 74193 or "divide by N counter", for more info.
Yes, that will do the job but I don't want to use any chip. Maybe I just need to read the structure used in the chip.
 

cmartinez

Joined Jan 17, 2007
8,220
Yes, that will do the job but I don't want to use any chip. Maybe I just need to read the structure used in the chip.
If that's the case, then I strongly suggest you download Digital Works. It's a free digital electronics simulator software that allows you to build logic layouts using the most commonly available gates and flip-flops to create any logic process that you want. And it's also an extremely powerful learning tool.
 
Last edited:

Brownout

Joined Jan 10, 2012
2,390
Do you mean that we use the reset signal of counter as the created clock?
No. Use the created clock as the reset of the counter.

I see that the clock doesn't have a 50% duty cycle. How can I get a 50% duty cycle?
Feed a flip flop configured as a 1-bit counter with 2X frequency you want (derived from the counter/decoder we discussed.) The f/f will divide the freq by 2 and guarantee 50% duty.
 

Brownout

Joined Jan 10, 2012
2,390
What you are describing is generally called a "divide by N" counter. A common chip used for this is a 74193 (TTL logic) programmable up/down counter. You load in the divide by number and clock the down pin. Do a google search for a 74193 or "divide by N counter", for more info.
Once can use !BO for the generated clock (not 50%Duty Cycle) and also to reload the start value. Or, load MAX COUNT - count(frequency), count up and use !CO.
 

alfacliff

Joined Dec 13, 2013
2,458
if you dont want to use any chip, you will have to build the circuti with resistors and transistors. that will take up a lot of time and parts. that is why chips were invented, making building blocks that could be connected together to make anything you want.
 
Top