Everything2
Near Matches
Ignore Exact
Full Text
Everything2

frequency divider

created by apessos

(idea) by apessos (3.1 y) (print)   ?   (I like it!) Tue Sep 02 2003 at 17:30:38

A frequency divider takes a frequency and slows it down. How much depends upon how you use the frequency divider. There are many ways to create a frequency divider. You won't use them all, but just remember that each has its own advantages and disdavantages.

There are chips that are made specifically for frequency division, FPGAs can use code to divide frequencies, and there are a handful of other ways using simple logic. The way that will be described here will use a D flip-flop, as that's where a frequency divider was mentioned.

For this example we are going to take a 2MHz clock and divide it down to 1MHz. This is only for illustrating how to do frequency division with a D flip-flop.

             _______
            |       |
          --|D     Q|--
            |      _|
          --|CLK   Q|--
             -------
and connect it as shown below.

        /------------------\
        |    _______       |
        |   |       |      | 
        \---|D     Q|---   |
            |       |      |
 2MHz ------|CLK  \Q|------/
             -------

And the output from Q is a 1MHz clock.

Here's how the above circuit works. When power is applied to the chip, the values of Q and \Q will be 0 and 1, respectively. When the clock signal goes high, D takes its value, which is the 1 from \Q, and gives it to Q. Since Q has changed from a 0 to a 1, \Q has to change from a 1 to a 0. Q and \Q are like night and day. They always have to be the opposite of each other.

Q and \Q will won't change again until the beginning of the next clock cycle when CLK goes high again. When that happens, Q becomes 0 and \Q becomes 1. Which puts us right back where we started, only two clock cycle later.

So what just happened? It becomes easier to understand if you focus just on Q. The value of Q only changes when the clock signal goes high. When the clock signal first goes high, Q becomes a 1. One clock cycle later, Q becomes a 0. On the third clock cycle, Q becomes a 1 again. So, Q goes up and down just like the clock cycle, only at a slower pace.

         Timing diagram
---------------------------------
         __    __    __    __
CLK     |  |  |  |  |  |  |  |
      --    --    --    --    --
---------------------------------
      __       _____       _____
D       |_____|     |_____|

---------------------------------
         _____       _____
Q     __|     |_____|     |_____

---------------------------------
      __       _____       _____
\Q      |_____|     |_____|

---------------------------------

Notice how the D, Q, and \Q are more stretched out then CLK?. They are twice as long, in fact. We just slowed the clock cycle in half. If you want to slow the clock cycle in half again, use another D flip-flop, like so


        /------------------\     /-----------------\
        |    _______       |     |   _______       |
        |   |       |      |     \  |       |      |
        \---|D     Q|------+--\   --|D     Q|---   |
            |       |      |  |     |       |      |
 2MHz ------|CLK  \Q|------/  \-----|CLK  \Q|------/  
             -------                 -------

The question came up, "why you would want to slow down the frequency in the first place?" And the best example that we would all recognize is an analog modem. Most analog modems can operate at 56.6k, 36.4k, 28.8k, 14.4k, 9.6k, down to 300bps. Each different speed requires a different frequency. So, instead of putting half a dozen oscillators on a modem, one frequency can be used and divided down to the speed that is needed.

There are other reasons to divide a frequency, e.g. the need for all the different clock frequencies to be synchronous with each other, but these are design dependent requirements.


printable version
chaos

D flip-flop frequency analysis How many men/women masturbate? FPGA
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
Drink up!
Temporary: Monday
concussion
Peanuts
Male lactation
Interpretations of the lyrics to American Pie
Did Ronald Reagan end the Cold War?
The Everything People Registry
Cuban Missile Crisis
High Infection Protocol
Borderline personality disorder
Firefly
At the Borders of Queer Nation
E-Prime
New Writeups
antigravpussy
One fly amongst many(person)
sam512
Moon Base Shackleton, 1978(fiction)
Pavlovna
toy boy(person)
XWiz
tear jerker(review)
Heitah
Anarchy is Order(idea)
jessicaj
July 26, 2008(dream)
Berek
ABBA(person)
devolution
k-hole(place)
Nadine_2
The Sound Of Madness(review)
SwimmingMonkey
Conversations with Fo Fo, the Loneliest dog in Purgatory(fiction)
locke baron
lynx(thing)
Simulacron3
Reality, Dimensions and the Natural Ontology(essay)
SubSane
Making Love to a 9-Foot Woman(person)
Ouzo
Thoughts(idea)
antigravpussy
I fall silent, listening. The breadcrumbs are talking about us(person)
Everything 2 is brought to you by the letter C and The Everything Development Company