enter image description here

Is there circuit to make two square waveforms of different frequency be in sync with each other at all times as shown and not drift over time?

  • 2
    \$\begingroup\$ feed the blue signal into a divider to generate the green signal \$\endgroup\$
    – jsotola
    Jul 1 at 3:12
  • 1
    \$\begingroup\$ In general, no, unless they multiples of the same frequency (which your image is). \$\endgroup\$ Jul 1 at 3:16
  • 1
    \$\begingroup\$ EIther compute the GCD of the two frequencies and provide that GCD value as a base frequency and apply two different DCO multipliers to get the frequencies you want or else compute the LCM of the two frequencies and provide that LCM value as a base frequency and apply two different digital divide-by-N to get the frequencies you want. This paper from TI may also be of some small interest, though I am not sure. \$\endgroup\$
    – jonk
    Jul 1 at 4:11
  • 1
    \$\begingroup\$ Sounds like you want something like a phase-locked loop (PLL). \$\endgroup\$ Jul 1 at 4:30

2 Answers 2


In the general case, it's called frequency synthesis.

You make a second frequency as a rational fraction of the first.


In your particular case, if you take the blue waveform as Fin, you could create the green waveform by clocking a divide-by-2 latch on the falling edge of Fin. If you wanted to use the green waveform as Fin, you might use a frequency doubler by closing a Phase Locked Loop around a divide-by-2 circuit, or you could double the frequency directly with logic or RF components.

The subject is vast, and this answer barely scratches the surface. There's a lot of technology (aka knowhow) about the hardware used to make multipliers and dividers, their noise performance, the permissible sizes of num and den and whether they can adjusted in real time. Most FPGAs now contain several dedicated frequency synthesis blocks to manipulate their clock signals, and you can buy complete Direct Digital Synthesis ICs for a few dollars from several manufacturers.



Yes, you can. What you want is called phase locking. You need to make the two frequencies based on the same source, otherwise you will never completely get rid of some drift even with the best frequency sources.

Longer answer:

There are different ways to get what you want. In your case where one frequency is an integer multiple of the other one, it's as simple as feeding one frequency into a frequency divider circuit (can be some flip-flops or counters) to get the second frequency.

If the frequencies are a rationale number apart you have several possibilities again:

  • You can take a higher frequency as your source (in lab equipment you have a 10MHz input somewhere for exactly that) and feed two frequency divider circuits to generate your desired frequencies.
  • You can use a PLL (phase locked loop) that you feed one frequency and set the multiplier and divider so that you get your desired other frequency.
  • You can take a common source frequency and use two PLLs to create your desired frequencies. Since you're using a common source, the phases of your two frequencies will be locked automatically.

Not the answer you're looking for? Browse other questions tagged or ask your own question.