Crystal "calibration" - how to (a simple way)?


Closed Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938

    Default Crystal "calibration" - how to (a simple way)?

    Hello,

    I have a 16F690 I with a 4MHz crystal. As specified in it's datasheet, I use two 22pF caps (C1 + C2).

    I'm building a time depend circuit (charger) where a +/- minute accuracy over 10 hours is not important.

    Nevertheless, I'd like to know how to "calibrate" the crystal to make it more accurate.

    I read this: http://ww1.microchip.com/downloads/e...tes/00588b.pdf and still don't know if I'm going to pull the trigger

    Then, I found this: http://ww1.microchip.com/downloads/e...Doc/70054b.pdf witch looks a little more understandable (comprehensible?) to me.

    Finally I read this one: http://ww1.microchip.com/downloads/e...tes/00826a.pdf.

    I was looking for a "simple way" to check the crystal's accuracy.

    Does anyone have this explanation for me?

    I only have a cheap PC 20MHz oscilloscope so I don't expect to make lab measurements...
    Roger

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Hi Roger,
    A quick way to adjust the calibration might be to replace the fixed capicitors with variable ones and tweak them until your circuit runs at the expected time.
    JS
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  3. #3
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default

    This is one way of doing, thank you Joe S. But this can take a lot of time...

    Isn't there another more "scientific" way to measure the correct oscillation frequency?

    I found some information in previous posts (can't find it right now) about measuring the crystal but there was an issue with the capacitance of the probe making the result inaccurate.

    If I make a short code toggeling a port and me measuring it with my (poor) oscillo, would the result be somehow reliable?
    Roger

  4. #4
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by flotulopex View Post
    This is one way of doing, thank you Joe S. But this can take a lot of time...

    Isn't there another more "scientific" way to measure the correct oscillation frequency?

    I found some information in previous posts (can't find it right now) about measuring the crystal but there was an issue with the capacitance of the probe making the result inaccurate.

    If I make a short code toggeling a port and me measuring it with my (poor) oscillo, would the result be somehow reliable?
    Sure there is, hook up a frequency counter, an accurate one, time your circuit's operation and log both entries, adjust as in above and time it again and compare OSC speed to circuit change, you then have a ratio to work from. OR use an RTC.
    Oh yeah, I thought of one more way, if you have an accurate radio reciever, you can check for the oscillators harmonic frequencies at different dial settings, 5,10,40,80 mhz and so on up and down the dial. Or use scope to form Lissajous patterns. example link http://www.egr.msu.edu/classes/ece48.../lissajous.htm

    Just curious Roger, why all the fuss for a battery charger?
    HTH
    JS
    Last edited by Archangel; - 1st October 2007 at 08:29.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Lightbulb

    Hi, Flotul

    The best and easier way is to buy quality crystals ... ( from Farnell i.e...).

    The second way is to use External DIP oscillators ...

    The Third way is to buy a good Freq meter ....

    I also think you can get precise 10 Mhz by radio ... ( see Radio ham ...)

    You can also correct time every minute with a DCF module !!!


    What I usually do is to play with the timer preload value ... fits most of time !!!


    One of the electronician's main headache has always been to have home good references ... ( Volt, freq, temp,pressure ...humidity ( LOL ! ) )

    Alain
    Last edited by Acetronics2; - 1st October 2007 at 10:18.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  6. #6
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default

    Thanks Joe S,

    Today I build a battery charger and tomorrow, what will it be? I just take the opportunity of this circuit to learn a little more about the accuracy my PIC can (or could) have.

    Of course, there is absolutely no need to have a lab's chronograph to charge batteries...

    Merci Alain. What is your measuring point to evaluate your precision? Is it a port as I mentionned in post#3?
    Roger

  7. #7
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Default

    Hi, Roger

    With time, I have built or bought ( thanks to Trent !!! ... LOL ) all the references I need.

    For Frequency ... I Bought ( God bless you, Trent ) a nice Discrete components meter 20 Years ago ... still accurate !!!


    Most of time, I verify clocks accuracy ... letting them run for a week !!! ( DCF clock as a reference ...)

    Seriously : ... after having made a "rough tuning" during an hour or a day ...

    Alain
    Last edited by Acetronics2; - 1st October 2007 at 13:44.
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  8. #8
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default

    ...rien de tel que la pratique!!!

    Thank you Alain and have a nice day.
    Roger

  9. #9
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Thumbs up

    Yes !

    And that includes temp, Humidity and voltage variations along a "significant" period ...

    Amitiés

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

  1. Simple RF remote control code
    By Bruce in forum Code Examples
    Replies: 13
    Last Post: - 22nd January 2014, 10:45
  2. Sharing Crystal with 2 IC's
    By ShaneMichael in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 10th January 2013, 13:33
  3. Simple Blinking LED - WTF!!
    By johnnylynx in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 1st February 2010, 06:19
  4. 20 Mhz Crystal, simple blinking LED
    By BenjaminsShinob in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 16th October 2007, 05:06
  5. Replies: 1
    Last Post: - 30th June 2004, 08:07

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