Article 55533 of sci.electronics: Path: earth.armory.com!nic.scruz.net!darkstar.UCSC.EDU!news.hal.COM!olivea!sgigate.sgi.com!sgiblab!swrinde!cs.utexas.edu!howland.reston.ans.net!EU.net!sunic!ugle.unit.no!trane.uninett.no!nac.no!news.kth.se!OLSSON@plafys.plasma.kth.se From: olsson@plasma.kth.se (Goran Olsson, Plasma Physics, KTH) Newsgroups: sci.electronics Subject: Re: Please help with Xtal osc circuit! Date: 16 Apr 1994 07:56:34 GMT Organization: Plasma Physics, KTH, Stockholm, Sweden Lines: 184 Message-ID: <2oo5ni$3qn@news.kth.se> References: <2ohjdc$oho@news.delphi.com>, Reply-To: olsson@plasma.kth.se NNTP-Posting-Host: plafys.plasma.kth.se Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit In article , dcschuur@sunee.uwaterloo.ca (Derek Schuurman) writes: >57 MHz is a little high but 74HC or 74AC should be able to >handle it... keep your layout tight and your de-coupling good. > >The way to do it is to use two series inverters, place the crystal >in between the output of one inverter to the input of the next >(assuming series resonance). Between the input and the output of >each inverter place a 2.2kohm feedback resistor. Between >the input of the first op amp and the ouptu of the second >op amp place a 100pF capacitor. > >Give this a whirls and see what happens - >you may hav eto place with the resistance and capacitance values >since you are "working on the edge" bandwidth wise. Don't do this professionaly. Restrict this for home use only. ;-) - Meaning that you may get away with one single circuit this way, but nothing reproducible. This is actually _bad_ advice. 74HC - no way. AC - a little high - could work - but DON'T use the circuit sketched. The crystal is likely to be a 3:rd or 5:th harmonic type, and the circuit above has little means to discriminate the crystal resonances, and enough gain to excite any of them. I would suggest using 74AS or possibly ALS inverters. Better re-post an article of mine. Crystal oscillator problems keeps coming up all the time. Should we have a FAQ for this? For a 54 MHz design, the last example is preferred (C-L-C pi filter). The DC feedback for an AS inverter is arranged like this: 1 kohm from output to input, and 1 kohm from input to ground. (I have not tested this.) Here is my article: ---------------------------------------------------------------------- Updated April 16, 1994 Following the crystal oscillator threads, I find this group in as urgent need as always of the basics of crystals and oscillator design for digital systems. ;-) The world is full of xtal oscillators twiddled by digital designers lacking in the analog design knowledge necessary. Just look at all the PC real time clocks that lags or leads by several minutes per day. And they eat backup batteries too! IC:s with pins that say "Xtal here" can't be trusted either! The design below, for 1 MHz, is a good starting point for a discussion: CMOS or HCMOS inverter |\ +--| >0---+----> OUT | |/ | | | +--\/\/\--+ | 1 Mohm | | | | \ | / 2.7 kohms | \ | / | | | 1MHz | parallel resonant +---|[]|--+ _|_ _|_ 55pf ___ ___ 60pf _|_ _|_ \ / \ / First of all, all crystals have two modes of resonance, the series and parallel resonances. These are closely spaced, and the circuit design must ensure that the resonance mode specified for the crystal is in operation, or you will end up with a frequency different from what is stamped on the crystal. In the series mode, the crystal shows a low impedance at the resonant frequency. This impedance is on the order of 100 ohms to a few kohms. In the parallel mode, the crystal together with a specified capacitance in parallel, normally 30 pF, shows a high impedance at the resonant frequency. The 30 pF value is used regardless of the frequency. All crystals have resonances at the odd harmonics, 3, 5, .. times the fundamental (overtones). At frequencies above 25 MHz, crystals are often made to operate at one of the harmonics. In all cases the external circuit must be made to suppress operation at the wrong harmonics or fundamental. Normally the crystals are specified for the parallel resonance mode. The circuit above is designed for such a crystal. The crystal and the 30 pF parallel capacitor are here transformed into a pi filter network by dividing the 30 pF cap into two 60 pF caps and grounding the middle node. When one end is driven from a low impedance, this network has a 90 deg phase shift at the frequency of maximum gain. With a suitable driving impedance, the phase shift is brought close to 180 degrees. Thus the 2.7 kohm resistor. Other good reasons for it are that harmonics are damped by the resulting RC filter, and that the inverter output is removed from the strange load of the crystal network. A rule of thumb for determining the value of the output to crystal resistor is that it should have the same impedance as the capacitor at the operating frequency: R:= 1/(2*pi*f*C) For a 32 kHz oscillator this resistor becomes 160 kohm. The gain and 180 degrees phase shift of an inverter is now all that is needed to make this circuit oscillate at the right frequency with no twiddling necessary. The resistor between input and output is essential to put the gate in the range of linear operation so the necessary gain to start oscillation will be there. Since a CMOS inverter has very high input impedance, the value can be large. It is not critical, but a low value will increase power dissipation. Use 1000 times the series resistor if you have no other preferences. Note that the inverter *must*not* be a Schmitt trigger. Also note that one of the capacitors is adjusted to correct for the input capacitance of the inverter. In an actual circuit, corrections should also be made for other stray capacitances. The frequency is fine tuned by trimming the capacitors. At higher frequencies account must be taken to the phase shift of the inverter. The phase shift for a gate when operated as a linear amplifier is certainly not to be found in any data sheet. Just note that 8 ns delay corresponds to 45 degrees phase lag at 16 MHz. Use this type of info as a starting point for adjustment by reducing the R & C:s. An 4000 series CMOS inverter is usable up to around 5 MHz. Use HC to 25 MHz, AC to 40 MHz. Above that you are into F, ALS or AS families. The same principles apply, but the DC feedback must be arranged by a voltage divider, and the impedance is much lower, on the order of kohms. To use a 3:rd or 5:th harmonic crystal, you need to insert a bandpass filter into the feedback to avoid oscillating at the fundamental or other harmonic. A series resonant LC filter is something that easily could be inserted between the output and the resistor in the above circuit. Zero degrees phase shift at the center frequency means that the other design criteria still hold. The Q of the filter should be low, around 1-3. Example for 30 MHz: (Just the filter.) .47 uH 56 pF 180 ohms from inverter output-----(((((------| |---------\/\/\/-+- to xtal | _|_ ___ 56 pF | _|_ \ / A C-L-C pi filter and series resonant crystal is another solution: 180 ohms .47uH from inverter output----\/\/\/--+---(((((----- xtal --+-- to input | series | _|_ _|_ ___ 120pF ___ 100pF | | _|_ _|_ \ / \ / Component values should not be taken literally. (No indication of inverter type given!) Some additional hints: Don't distribute the inverter output node over a large PC board. Instead use free inverters of the same chip for buffering. If you use the other inverters of the same chip for other signals, be aware that there is crosstalk that causes phase jitter in the oscillator output that might be disturbing in critical applications. For a clean noise-free output, a local voltage regulator to supply the inverter is also a good idea. Also apply care in the PC board layout of the oscillator. Ground plane, good power decoupling, no signal wires routed under the crystal circuit. ========================================================================= Goran Olsson Alfven Laboratory, Plasma Physics, Space Group, Electronic Engineering, KTH (Royal Institute of Technology), Stockholm, Sweden olsson@plasma.kth.se ========================================================================