# Frequency divider

Discussion in 'General Electronics Chat' started by anhnha, Jan 14, 2016.

1. ### anhnha Thread Starter Active Member

Apr 19, 2012
748
44
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,...?

2. ### Brownout Well-Known Member

Jan 10, 2012
2,375
998
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.

anhnha likes this.
3. ### cmartinez AAC Fanatic!

Jan 17, 2007
3,523
2,343
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.

anhnha likes this.

Jan 17, 2007
3,523
2,343
5. ### anhnha Thread Starter Active Member

Apr 19, 2012
748
44
Could you explain a bit more?

6. ### dannyf Well-Known Member

Sep 13, 2015
1,608
317
There are decimal counters.

Also, shift registers can be configured as counters to any integer.

anhnha likes this.
7. ### Brownout Well-Known Member

Jan 10, 2012
2,375
998
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.

anhnha likes this.
8. ### anhnha Thread Starter Active Member

Apr 19, 2012
748
44
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?

Aug 21, 2008
2,586
607

Apr 19, 2012
748
44
11. ### Lestraveled Well-Known Member

May 19, 2014
1,957
1,214
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.

alfacliff and cmartinez like this.
12. ### anhnha Thread Starter Active Member

Apr 19, 2012
748
44
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.

13. ### cmartinez AAC Fanatic!

Jan 17, 2007
3,523
2,343
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: Jan 14, 2016
Sinus23, atferrari and anhnha like this.
14. ### Brownout Well-Known Member

Jan 10, 2012
2,375
998
No. Use the created clock as the reset of the counter.

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.

15. ### Brownout Well-Known Member

Jan 10, 2012
2,375
998
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.

16. ### alfacliff Well-Known Member

Dec 13, 2013
2,449
428
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.