Need help calculating OSC cap values


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429

    Default Need help calculating OSC cap values

    I'm building a low power, low speed circuit using a 32.768kHz crystal but i'm not sure what cap values to use with the oscillator.

    Does anyone know how to work out what values to use?

    PIC: 18LF1320

    CRYSTAL:
    Frequency: 32.768kHz
    Frequency tolerance: ±20ppm (@25°C)
    Operating temperature:-10°C to 60°C
    Shunt capacitance:2pf max.
    Load capacitance:12.5pf
    Insulation resistance:500MOhm @ 100VDC
    Drive level:1µW max.
    ESR (Equivalent series resistance):35KOhm

    *edit*: I'm using a 32.768kHz crystal to facilitate accurate clock timing over longer periods, so that's why I ask about the caps because I have read that the wrong value will put the frequency out.
    Last edited by Kamikaze47; - 26th June 2008 at 16:56.
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    18F1320 datasheet, DS39605F-page 12, says typical values are 33pf, and it also says that the values used are for design guidance only. And as it further states below that,

    Different capacitor values may be required to produce
    acceptable oscillator operation. The user should test
    the performance of the oscillator over the expected
    VDD and temperature range for the application

    So, in short, it'll really depend on everything you do...how you mount everything, temperature range, actual voltage range of the PIC, phase of the moon
    Testing is about the only way to verify anything.

  3. #3
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    Yeah... I guess using a variable cap for one of them is a good idea?
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kamikaze47 View Post
    Yeah... I guess using a variable cap for one of them is a good idea?
    I don't think so, but that's just me.
    I would think a variable cap would have more +/- over a temperature/voltage/sun angle range ( ) range than a standard cap.

    And don't forget...when you're trying out those 'standard caps' and you're looking for accuracy, a lot of caps have tolerances as wide as something like +80%/-20%. You can get ones that are tight, but they'll cost you.

  5. #5
    Join Date
    Nov 2005
    Location
    Perth, Australia
    Posts
    429


    Did you find this post helpful? Yes | No

    Default

    The problem is, if its going to be trial-and-error to work out the right value, i'm going to need a lot of caps.
    "I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams

  6. #6
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kamikaze47 View Post
    The problem is, if its going to be trial-and-error to work out the right value, i'm going to need a lot of caps.
    That's a fact.
    But you've also got a completely configurable PIC that you can program in a bunch of correction values into.
    (i.e. crystal is off 1%, program in 1% compensation).
    So, as I see it, you only need 2 capacitors and a bit of math.

Similar Threads

  1. Internal vs. external osc for comms
    By mtripoli in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 29th January 2010, 14:58
  2. WRITECODE stores wrong 14-bit word values in FlashMEM
    By BobPigford in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 26th June 2009, 04:35
  3. Looking at pic basic pro symbol values in mplab 8.15a simulator
    By ukemigrant in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 16th May 2009, 13:18
  4. 16F877A problem: "coupled" digital values
    By Lupo83 in forum General
    Replies: 16
    Last Post: - 4th December 2007, 12:46
  5. calculating arc tangent
    By mischl in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 14th July 2005, 07:29

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts