I have been experimenting with oscillators this week. And building a computer clock. I got two crystals, one at 2 MHz another at 4 MHz.


simulate this circuit – Schematic created using CircuitLab

everything is super simple. As soon as I stick that crystal in, it starts oscillating.

But, when I measure the frequency with my oscilloscope, I get 8 MHz instead of that specified 2 MHz. And I don't understand why?

Here is the proof. My test circuit: breadboard experiment

Here is the scope at 0.1 μs per division. Upper wave is the output of inverter 2, the lower wave is from the additional inverter after that. oscilloscope showing 4 periods in 5 horizontal divisions

Clearly it's 4 periods in 5 divisions and 8 in 10 divisions, so 8 in 1 μs, obviously f = 8 MHz, or T = 125 ns.

How come? When I stick in the "4.000 MHz" crystal, I get double the frequency, so 16 MHz.

I thought that perhaps there is something wrong about this inverter circuit, but I tried 74LS326 and 74LS629 integrated oscillators with those same crystals and I'm getting the same 8 MHz for the "2.000 MHz" crystal.

How can that be?

Finally proof of my oscilloscope setting, and it's not off. When I measure 1 kHz audio waves they sound like 1 kHz and not 250 Hz, so my scope is not off by a factor of 4. [EDIT: this might have not have been true after all.]

enter image description here

  • 4
    \$\begingroup\$ That upper right knob "VARIABLE" looks rotated counter-clockwise. Should be turned clockwise to the "CAL" position. \$\endgroup\$
    – glen_geek
    Jun 21, 2020 at 1:23
  • 2
    \$\begingroup\$ Building that circuit on a prototyping plug-board is asking for trouble - the parasitics are usually too high for such circuits. Also the more common arrangement uses a Pierce oscillator with a single amplifier. Your circuit operates the crystal at series resonance. \$\endgroup\$ Jun 21, 2020 at 2:09
  • \$\begingroup\$ I think the parasitics are so severe that drawing simple conclusions are neigh impossible. \$\endgroup\$
    – user105652
    Jun 21, 2020 at 3:15
  • 1
    \$\begingroup\$ Where did you copy this circuit? Why there is no AC coupling cap between inverters? Why build a parallel resonant oscillator with LS04, while a series resonant oscillator with HCU04 is more common and people have less issues with it? \$\endgroup\$
    – Justme
    Jun 21, 2020 at 7:58
  • 1
    \$\begingroup\$ @glen_geek, I think you should have put this as an answer, because it seems to me that that really made a huge difference! It would be the one accepted correct answer. I will have to recreate that test board now to see that the crystal actually clocked just fine at 2 MHz even with this super simple inverter circuit... \$\endgroup\$ Jul 4, 2020 at 18:06

3 Answers 3


This answer is actually @glen_geek's who commented on Jun 21 at 1:23:

That upper right knob "VARIABLE" looks rotated counter-clockwise. Should be turned clockwise to the "CAL" position.

and it is true. I have no idea why I didn't notice the discrepancy, I should have heard that 440 Hz is nothing like the tune fork and the 1 kHz of which I spoke was nothing at all like a high C. All my frequency measurements were 8-fold too high because of that variable knob.

And this also proves that this super-simple oscillator circuit with simply those 2 inverters is working well and reliable.

If Glen Geek @glen_geek wants the reputation I encourage him to put the answer up so I can accept it.

  • 1
    \$\begingroup\$ Thanks for the Q resolution. Accept your own answer. I have a PCB version (74LS00) and put it on the bench. It is AC-coupled with a capacitor. A crystal marked "10.000Mhz" oscillated @ 9.99908 MHz....very likely at its series-resonant point. A small-value series capacitor brought it up to 10.0Mhz. Another crystal marked "1.84320MHz" oscillated @ 1.84299MHz....again near series resonance. With crystal pulled out, there was no oscillation on this PCB version. \$\endgroup\$
    – glen_geek
    Jul 4, 2020 at 19:59

Most such oscillators require external 22pF capacitors from each end of the STAL to achieve a nete phase inversion to implement proper oscillation.

Since 22pF is LARGE, the silicon area likely is not used to provide those 44pF caps (which will vary as the manufacturer recommends for your frequency). Does your IC include those? I see two resistors, value 1Kohm.

  • 2
    \$\begingroup\$ The circuit that is being used does not require the phase inversion as it has inverting amplifiers in cascade. It requires a crystal designed for series resonance. The more common oscillator uses an inverting amplifier and then relies upon the crystal and capacitors to provide the other 180 deg of phase shift. The circuit shown also has the disadvantage that parasitic capacitances can cause oscillation even without a crystal at all - this is particularly relevant since it has been constructed on a prototype board with very high parasitics. \$\endgroup\$ Jun 21, 2020 at 2:07
  • \$\begingroup\$ A breadboard has large parasitic capacitance, usually enough for a crystal. \$\endgroup\$
    – Turbo J
    Jun 21, 2020 at 5:02
  • 2
    \$\begingroup\$ @TurboJ - A crystal in series resonance does not require one, it could stop it functioning or alter the frequency. The amplifier already provides al the phase shift required for oscillation - in fact it will tend to oscillate without a crystal. \$\endgroup\$ Jun 21, 2020 at 19:21
  • \$\begingroup\$ @TurboJ right on! When I take that crystal out I get very high frequency oscillation, reaching 20 MHz. \$\endgroup\$ Jun 23, 2020 at 2:05

As Kevin White has mentioned, the Pierce oscillator uses just one inverting gate, and to me that feels like exactly the correct approach. Not sure about "series resonance" (I recall reading something about different resonant modes in the crystals, and crystal cutting geometries) but my general idea is, that the crystal, being a two-pin device, needs a clear AC signal applied to its pins, i.e. the two pins should be driven "inverted against each other", i.e. 180 degree phase shift at resonance. The metal case is effectively a third pin, like a loosely coupled reference ground (shielding) but that should not matter much.

I'm wondering what happens if you attach a crystal to a non-inverting amplifier. I am surprised that the circuit oscillates at all :-) I can come up with the following explanation: the two gates in series each have a "propagation delay". So the actual phase shift is not 0 ns, not 360 degrees. Depending on the logic family that you have chosen, the cascade can have anywhere between 4 ns and say 50 ns of propagation delay. Therefore, IMO your circuit resonates at some "upper harmonic mode / frequency" of the crystal, where that time-domain propagation delay of your two gates combined corresponds to a phase shift of 180 degrees (the crystal adds another 180*) and the AC gain within the loop is > 1. Actually, where the gain si >1 and highest of all such harmonic resonant modes. I am inclined to call that oscillations style "a little parasitic" :-)

Actually, my explanation above is slightly wrong. In reality, the crystal (being a resonance-heavy device) likely presents a steep gradient of phase shift around any of its resonant modes (harmonic frequencies). So it's not that "the propagation delay of the gates equals 180 degrees". Possibly not nearly that. It settles at some frequency near a particular resonant mode, where the propagation delay "adds just that wee bit needed for an optimal solution", when combined with the phase shift of the crystal being pulled up...

Thinking again, I'm probably starting to understand what Kevin might mean by series resonance, approximately... perhaps the 4th harmonic indicates a mode where the wave in the crystal tends to drive the two pins in-phase, common mode style? Against the chassis as a "reference center pin" ? But you don't have the crystal chassis grounded... This train of thought is giving me a bit of a headache :-)

The crystal is an electro-mechanical device. For optimal working conditions, it needs loading of its pins against a "common ground" (ideal center signal, maybe?) and the optimal load capacitance is mentioned in the crystal's datasheet. If you don't have one, it will likely be similar for other crystals of the same frequency and geometry. That's where the crystal supposedly resonates happily at its nominal frequency, if you drive it by 180deg-phase-shifted signal. If the "crystal load capacitance" is lower than specced, normally it will pull the crystal a little off the center frequency (within say 400 ppm, IME) - but arguably a much lower capacitive load will allow for the higher harmonic modes to prevail...

In the spring of 2018, I've done my own hobby hack with a crystal, and I have seen some harmonic oscillation too. In my case, it was the 3rd harmonic. And I had a cold joint in the circuit, which did not help debugging ;-) but abstracting from that bug, my solution to move the crystal to its base resonance was: properly load the pins (which I did right from the start) and provide an additional bit of LC filtering in the feedback loop, to make the base frequency more appealing to the loop (in terms of loop gain). My own motives were probably different from yours, but I'm providing a link because the people here have provided a lot of useful comments and help on the topic of crystals.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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