Shop OBEX P1 Docs P2 Docs Learn Events
How to divide a clock signal? — Parallax Forums

How to divide a clock signal?

MarkSMarkS Posts: 342
edited 2009-11-19 21:54 in General Discussion
I need to divide a clock signal from an oscillator by 1/4. The frequency is non-standard and the only oscillator I could find is 4x the needed frequency. I found a brief and rather vague reference in an old Motorola 68000 hardware development book that recommended using an 8-bit binary counter (divide by 256) to accomplish this, but that part is almost as hard to find as the oscillator.

How should I go about this and can someone give me a part number?

Comments

  • LeonLeon Posts: 7,620
    edited 2009-11-14 17:52
    Use a dual D-type flip-flop like the 74HC74.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
  • kwinnkwinn Posts: 8,697
    edited 2009-11-14 22:21
    My favorite chip for this wis the 74HC4017. It can be set to divide by anything from 2 to 10 by connecting one of the outputs to the reset pin. The only catch is that it does not provide a symmetrical waveform.
  • MarkSMarkS Posts: 342
    edited 2009-11-15 06:13
    Awesome! Thanks!
  • RiJoRiRiJoRi Posts: 157
    edited 2009-11-16 14:37
    kwinn said...
    My favorite chip for this wis the 74HC4017. It can be set to divide by anything from 2 to 10 by connecting one of the outputs to the reset pin. The only catch is that it does not provide a symmetrical waveform.

    To get a symmetrical waveform, double the divide-by and put the result through a flip-flop. That is, if you have a 60 Hz clock, and you want a 10 Hz clock, use the 4017 to divide by 3. Feed it into the F/F (divide by two) and get a divide by 6 with a 50-50 cycle.

    60 / 6 = 10
    60 / 3 = 20; 20 / 2 = 10

    --Rich
    P.S., if you only need a divide by 4, then the dual flip-flop will do the trick.
  • kwinnkwinn Posts: 8,697
    edited 2009-11-18 18:13
    RiJoRi,

    I think you meant half the divide by (as your math shows) and put the result through a flip/flop . I do that when I need a symmetrical waveform and a non binary divide by. Typically a '4017 and a '393.

    I am somewhat lazy and prefer to use time proven circuits where applicable so I usually use the 4017 alone where non symmetrical clocks are ok, with a binary counter for a non binary divide and symmetrical waveform, and a binary counter for a binary divide by and symmetrical waveform.

    Of course nowadays if there is a prop in the circuit with an available pin I prefer to use it to generate the required signal.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-11-18 21:03
    Here's a schematic for the dual flip-flop circuit using a 74HC74:

    attachment.php?attachmentid=65203

    -Phil

    _
    540 x 133 - 2K
  • kwinnkwinn Posts: 8,697
    edited 2009-11-18 22:33
    No argument from me, the '74 does the job, but I have good reasons for using the '4017 and/or '393.

    The '393 is a 14 pin chip same as the '74 so board real estate is not an issue. It has 2 x 4 bit counters so any binary divide by from 2 to 256 is available. Each counter has only a clock and clear input so the wiring is very simple. If a counter is not used the inputs can be grounded so it draws almost no power.

    The '4017 can be used to divide by any number from 2-10 with only one jumper to select the divide by.

    Combined the two chips are an extremely versatile frequency divider.
  • MarkSMarkS Posts: 342
    edited 2009-11-19 20:09
    kwinn said...

    Of course nowadays if there is a prop in the circuit with an available pin I prefer to use it to generate the required signal.

    That was a thought as well, but how do I use the Prop to generate a 15.6672 MHz signal? And if I can generate this signal with the Prop running at 80 MHz, is it possible to read a signal at that frequency (15.6672) with the Prop?

    Rather than rehash what I'm trying to do here, you can look at these two threads to get an idea:

    Thread 1 (Off site)
    Thread 2 (Here)

    Post Edited (MarkS) : 11/19/2009 8:18:25 PM GMT
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2009-11-19 20:52
    kwinn,

    If you need to go beyond a division of 10, there is a way to dynamically divide by "N" using a 555 configured as a monostable multivibrator.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • kwinnkwinn Posts: 8,697
    edited 2009-11-19 21:54
    MarkS,

    That response was not really aimed at your specific problem. You would need a specific frequency of crystal to get what you want, but using the prop widens the choice of crystals from what a simple binary counter provides.

    Beau,

    I have used that technique in the past but it does have some limitations. The frequency range is somewhat limited, and if the divide by gets too high the drift/jitter of the r/c circuit can be enough to change the value of "n" by 1 or 2 ... or more.

    I have to admit though that the 555 is one of my favorite chips of all time. Nothing comes close to its ratio of functionality to complexity. So very simple yet so many applications.
Sign In or Register to comment.