Shop OBEX P1 Docs P2 Docs Learn Events
crystal load capacitance and the Propeller — Parallax Forums

crystal load capacitance and the Propeller

Bobb FwedBobb Fwed Posts: 1,119
edited 2010-07-10 03:58 in Propeller 1
How does the crystal load capacitance work with the Propeller? According to the datasheet the capacitance the propeller uses when in XTAL1 mode is 36pF. The crystal on parallax's website is 20pF and the one I use is 18pF. So how does this all work together?

I find the 18pF capacitor seems to run a bit slow (maybe 0.05%) and I am wondering if that is because of capacitive load I am using or what? Is there some hardware way to fix that? Maybe series capacitors or parallel? Or do I just need to measure what it is producing and put that in as the crystal speed instead of 5MHz?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!

Some of my objects:
MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!

Comments

  • LeonLeon Posts: 7,620
    edited 2010-07-09 21:41
    I think that the internal feedback capacitors used in the Propeller's oscillator circuit were designed for a crystal with a 20 pF load capacitance. Using a crystal with a lower load capacitance will result in the oscillator running slow, as you have found.

    The frequency could be adjusted by using a small trimmer capacitor from one side of the crystal to ground if the error is in one direction, or a tunable inductor in series with the crystal, if it is in the other direction. Or, you could measure the frequency, and compensate for the error in your software.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-07-09 23:25
    This apparent discrepancy was explained somewhere, but I wouldn't know where to begin looking for it. I think it was either Mike Green or Tracy Allen who explained it. IIRC, the 36pF figure represents a value that is twice that of the crystal spec. Whether that's because it's the sum of two pins, while the crystal spec is per pin, or something else, I don't remember. But, whatever the reason, 18-20pF is the correct crystal spec to look for in a 5MHz crystal.

    -Phil
  • Bob Lawrence (VE1RLL)Bob Lawrence (VE1RLL) Posts: 1,720
    edited 2010-07-09 23:37
    There's a guide on Page 68 of the Propeller Manual v1.1




    Clock Mode Setting Constant1
    XO Resistance2
    XI/XO Capacitance2
    Description
  • LeonLeon Posts: 7,620
    edited 2010-07-10 03:48
    Phil:

    With the usual Pierce oscillator configuration, the feedback capacitors (internal on the Propeller) are effectively in series and need to be roughly twice the load capacitor value. Strays need to be accounted for, which is where the 36 pF comes from.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-07-10 03:58
    Thanks, Leon. That explanation makes sense. And "Pierce" is the search term that finally turned up the thread I was looking for:

    http://forums.parallax.com/showthread.php?p=816552

    -Phil
Sign In or Register to comment.