Shop OBEX P1 Docs P2 Docs Learn Events
Crystal Considerations — Parallax Forums

Crystal Considerations

KyeKye Posts: 2,200
edited 2009-06-19 12:50 in Propeller 1
Hey guys,

Do I really need to match the load capacitance for the propeller chip using the xtal1, xtal2, or xtal3 settings?

Its pretty hard to find a 5mhz crystal with a 36pF load capacitance for sale.

... And lets say I found a 20Mhz crystal with a 16 pF load capacitance for the xtal3 setting. Would it be even possible to use such a crystal with pll4x since the internal first stage pll will multiply that number up to 320Mhz before bringin it back down to 80Mhz...

Thanks for your help.





▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-06-18 22:14
    No, you can't use a 20MHz crystal with the PLL. It's too far outside the 4-8MHz spec. Also, the optimum load capacitance for a 5MHz crystal is 18-20pF, not 36pF.

    -Phil
  • KyeKye Posts: 2,200
    edited 2009-06-18 22:23
    I thought 20Mhz would not work.

    ...Mmm, then I'm miss interpreting page 14 of the datasheet.

    It list some different stuff for specifications there... Must be the propeller's internal load capacitors then.

    Thanks,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-06-18 22:27
    That appears to refer to the actual pin capacitance, not to the recommended load capacitance of the crystal.

    -Phil
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2009-06-19 00:25
    I scratched my head about that specification too.

    Load capacitance of a crystal is in fact the capacitance that the oscillator presents to the crystal, and is the parallel sum of the capacitance at the input and at the output of the chip, plus strays. It is a property of the oscillator circuit and to some extent also the circuit board. When you order a crystal, you tell the crystal manufacturer what that load capacitance will be, so that they can make a crystal that will resonate at exactly the frequency you specify with that load capacitance. If it is mismatched, it will most likely still oscillate, but the frequency will be off by some ppm or even up to on the order of 0.1%. If a crystal is built for a load capacitance of 15 pF, but the oscillator actually presents a load capacitance of 36pF, then the frequency will be less than the value printed on the package. The exact "trim sensitivity" depends on the internal motional and shunt capacitances of the crystal itself. The Statek web site has good technical notes, and I particularly recommend number TN33.

    Now the Prop data sheet states "Xin and Xout capacitance" of 36 pF on XTAL1. What does that mean? "X" usually refers to reactance in Ohms, a minor gripe. It is clear we are talking about capacitance, and 36 pF for both Cin and Cout would be extraordinarily high. That adds up to a total Cload of 72pF without counting in strays. Not likely. Maybe it means the total Cload is 36 pF. Still atypically high, but possible. It is noteworthy that the HC49 crystal that Parallax sells is specified to oscillate at 5mHz with a load capacitance of 20pF at XTAL1, and if the oscillator does in fact present a load capacitance of 36 pF (or 72pF) then the frequency will be pulled below 5 mHz.

    The Prop data sheet also states that for oscillator input XTAL0, the pad capacitance is 6pF (pad only), which makes me wonder how we got up to 36 pF. If you have an input pad at 6pF and an output pad at 6pF, the Cload would be 12 pF, unless extra is added. I think I must be missing something about those specs, thus the head scratching.

    I've been looking at some nice 6.25 mHz surface mount crystals, but their standard load is 12pF, and it costs a premium to order them with anything but the standard.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com

    Post Edited (Tracy Allen) : 6/19/2009 12:30:37 AM GMT
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-06-19 00:52
    Thanks, Tracey, for the thorough explanation! It really is a head-scratcher now for this reason: One would imagine that the standard Parallax-provided 20pF crystal would oscillate at the wrong frequency, given the presumed capacitance mismatch. But the best proof that it doesn't is the fact that, with it, the Propeller is still able to produce color composite video, which is extremely fussy when it comes to the colorburst frequency.

    Maybe Chip or Beau could fill us in on what the datasheet really refers to.

    -Phil
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2009-06-19 01:15
    That TN33 note from Statek shows how to measure the load capacitance of an oscillator circuit. In method #1, install a crystal, say our usual one that is nominally 5 MHz. Measure the actual frequency of oscillation very accurately. Take the crystal out and measure the reactance in Ohms of the crystal at exactly that frequency. They suggest using a network analyzer for that purpose, but it should be sufficient to place the crystal carefully (i.e. short leads) in series with a resistor and a signal generator, and measure the AC voltage across the resistor with a high impedance AC voltmeter, and calculate. If the resistor has the same reactance as the crystal at that frequency, then the Xc = R. Now having F and Xc, calculate Cload as,
    Cload = 1 / (2*pi*F*Xc)
    That comes from the condition that the series combination of the crystal and Cload is purely resistive at resonance.

    How many ppm shift is tolerable for color composite video?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-06-19 01:50
    Tracey Allen said...
    How many ppm shift is tolerable for color composite video?
    The specs say 2.8ppm for commercial transmission. But receivers are capable of a much wider capture range. Here is a paper that exlores this subject and suggests an acceptable range of around -450Hz to 525Hz, or 270ppm.

    In my own experience, I've seen the color drop out due to a poorly-soldered crystal connection, where everything else worked fine.

    -Phil
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2009-06-19 07:16
    Ahhh, idea.gif it is making sense now. The total load capacitance is the two capacitors in series not parallel. Think of it as a loop with the two load capacitors connected in series (at the ground node), around through the crystal which is acting like an inductor to make the whole thing a parallel resonant circuit. The inverter is also in parallel and is injecting current to keep it going.

    With each capacitor in the Prop at XTAL1 being 36 pF, the series combination is 18pF and the crystal with a designated 20 pF load capacitance is just about perfect.

    I'm assuming the Prop has a Pierce oscillator like the one pictured, and the Xout resistance corresponds to the RA output resistor (for stability against temperature changes and to reduce the xtal drive). And the Xin and Xout capacitance corresponds to the CG and CD. There also has to be a feedback resistor internally to bias the inverter into linear operation.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
    295 x 198 - 12K
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2009-06-19 08:32
    On PAL we were allowed 1Hz on studio generated 4.43MHz, and 5Hz on OBs. BBC referenced theirs back to Rubidium Drives. These "standards" were obviously far tighter than needed, but·back then, there were standards. We always used "off air BBC2"· and a vector 'scope to set up the frequecy. The loss of terestrial TV will end that little trick.

    Decoders have to bee made to accept far wider errors as the 4.43MHz could be coming from all sorts of equipment such as computers, toys and set top boxes. As long as the frequency is kept within·that locking range the decoder will work, as the· reference burst will be equally wrong.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Style and grace : Nil point
  • LeonLeon Posts: 7,620
    edited 2009-06-19 12:50
    Tracy:

    With the usual Pierce oscillator used on most MCUs, the feedback capacitors are effectively in series. This is often the cause of much confusion because they appear to be in parallel when one looks at the schematic. Stray capacitance also needs to be taken into account, I usually assume 6 pF.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
Sign In or Register to comment.