Check oscillator/Xtal accuracy - how to?


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    952


    Did you find this post helpful? Yes | No

    Default ...

    Connecting an oscilloscope directly to the resonator or Xtal will allow me to check the oscillator only.

    To make a nice and clean measurement of the PIC itself allowing me to fine tune it (OSCTUNE register), how should I do?
    Roger

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    For the internal osc, just set your config option to output Fosc/4 on OSC2 and check it
    with a freq counter or O-scope.

    With a 4MHz internal osc, you should see a 1MHz output on OSC2 when it's spot-on 4MHz.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

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


    Did you find this post helpful? Yes | No

    Default external?

    Thanks Bruce,

    What about measuring the PIC's accuracy with an Xtal?
    Roger

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Well, since the PICs accuracy is totally dependent on the external crystals accuracy, I
    would suggest you look into what Melanie posted above...;o}

    A freq counter will do the trick as long as you're not loading the oscillator.

    If Melanie says it works, you can normally take that to the bank, and be done with it.

    She knows her stuff..;o}
    Last edited by Bruce; - 4th March 2009 at 19:39.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  5. #5
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    952


    Did you find this post helpful? Yes | No

    Default Humm...

    So I'm going to take Melanie's advice as the "absolute" truth.

    As you say Bruce, what Melanie says, it is!

    Thanks All.
    Roger

  6. #6
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    I wouldn't take anything anyone says here as the "absolute" truth, but my
    money would be on whatever Melanie said unless I was 100% sure I could prove
    it was otherwise..;o}

    And good luck with that!
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  7. #7
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    If you don't happen to have a frequency counter.
    You can put a 32768hz watch crystal or DS32KHZ compensated oscillator on TIMER1 and use it as the time base to measure your system frequency.

    I trust it more than frequency counters, which in the Mhz ranges can be off by several Khz, depending on the quality of the counter.

    An example of the technique can be found in Microchip's AN244.
    Although it's geared towards calibrating the internal oscillator, the concept is the same for externals.

    http://www.microchip.com/stellent/id...pnote=en012071
    DT

Similar Threads

  1. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 22:07
  2. PIC16F877A - Timer0 won't interrupt
    By WishMaster^ in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 25th April 2007, 09:25
  3. Code check -- button not working
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 2nd March 2006, 23:43
  4. Block Check on Serial Comms.
    By Mark Scotford in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 15th June 2005, 10:27
  5. Even Parity Check, How?
    By Mark Scotford in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 24th January 2005, 10:21

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