I want to create a CLK generator circuit that will work at 8Mhz. I'm following this design (from http://www.electronics-tutorials.ws/oscillator/crystal.html): CMOS Oscillator Circuit

My crystal is 8Mhz HC49/US, with 20pF capacitance as described in the website I bought it from.

I'm using R1 = 10Mohm , R2=1Kohm , and as for C the smallest I had was 150pF so I used 6 of them in series which should give 150/6 = 30pF . My inverter is a 6 input buffer NOT gate from TI (cd40106b) , I'm using two of its gates for the circuit (AMP + buffer).

After connecting it all, and hooking up my (PC based) oscilloscope, I saw I'm only getting a 1.5Mhz signal , which was very far from a square wave I was expecting - more of a triangle kind of waveform. Then I removed the crystal from the circuit, and the waveform stayed the same, so I'm obviously doing something wrong here as I'm just seeing the RC circuit oscillating. I've replace the crystal with two others and got the same results. The NOT gate should just fast enough for this circuit ,working at VDD=5V , transition time is typically 100nS and up to 200nS and I'm no way near this with my results.

I think I'm using the correct values for R2 and C but I'm not sure. How do I calculate the correct R and C values to use for my circuit? Could it be the reason for this behavior? I've also tried to assemble a circuit using CD4060 (counter) like the one from the comment.

to see if the problem is coming from the inverter but I still can't get the input frequency to be 8Mhz. What can I do to further debug this?

  • \$\begingroup\$ 4060 cricuit I was following : hackersbench.com/Projects/1Hz \$\endgroup\$ – ranm Feb 2 '16 at 16:31
  • 1
    \$\begingroup\$ How did you put this together? PCB? Breadboard? What is the bandwidth of your oscilloscope? \$\endgroup\$ – PlasmaHH Feb 2 '16 at 16:33
  • \$\begingroup\$ Might be a good idea to obtain smaller caps. 30pF might be too much. Also, if you are building this on a breadboard, don't do that. Getting crystal oscillators to work on a breadboard is more trouble than you want. \$\endgroup\$ – uint128_t Feb 2 '16 at 16:52
  • \$\begingroup\$ Cannot find the inverter chip you refer to on Google in the first 10 hits in a language I can read. Are you sure about the number? Elseways (<- that is a word, shut up), please provide a link. \$\endgroup\$ – Asmyldof Feb 2 '16 at 17:19
  • \$\begingroup\$ Sorry - There is a mistake in the post , the inverter I'm using is the TI cd40106b : ti.com/lit/ds/symlink/cd40106b.pdf \$\endgroup\$ – ranm Feb 3 '16 at 8:21

The usual recommendation for the Pierce oscillator is to use un-buffered standard inverters, ie not schmitt trigger input inverters. The inverter needs to work in its linear region which is almost impossible with a schmitt trigger input. Try TI's LVC1GU04.

  • \$\begingroup\$ I suspect the schematic contains a typical bit of internet sloppiness. The first inverter is not intended to be a Schmitt trigger, as evidenced by the fact that the 2nd one is so labelled. But the originator was sloppy and used the same symbol for both. \$\endgroup\$ – WhatRoughBeast Feb 2 '16 at 18:54
  • \$\begingroup\$ Hey , Thanks, I'm looking for a DIP package one, so I will lookup digikey. But I still don't understand why is that an issue? \$\endgroup\$ – ranm Feb 3 '16 at 8:29
  • \$\begingroup\$ I'm looking at this one: CD74HC4049E ti.com/lit/ds/symlink/cd74hc4049.pdf But I'm not sure about it's timing figures. I'm looking to work at 3.3v , so do you think this will be fast enough for 8Mhz ? I guess I can use it also as the buffer circuit instead of the schmitt trigger (I'd really prefer to use just 1 IC and not two), right? \$\endgroup\$ – ranm Feb 3 '16 at 8:53
  • \$\begingroup\$ This is also an option : 74AC11004 ti.com/lit/ds/symlink/74ac11004.pdf looks faster , but larger and more expensive. \$\endgroup\$ – ranm Feb 3 '16 at 9:06
  • \$\begingroup\$ Inverters normally operate digitally - logic 1 in, logic 0 out, etc. In your circuit R1 forces the inverter to work as a high gain linear amplifier to provide the gain needed for oscillation. However, a schmitt trigger input inverter cannot work as a linear amplifier and will not work correctly in this circuit. The original article in electronics-tutorials which shows a schmitt trigger inverter was wrong. You have already verified this, by removing the crystal the circuit still oscillates at 1.5MHz. \$\endgroup\$ – Steve G Feb 3 '16 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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