Question about Oscillators


Closed Thread
Results 1 to 7 of 7
  1. #1
    RossW's Avatar
    RossW Guest

    Default Question about Oscillators

    1) pic12F629 has the capacity to be run at 20 Mhz - does that include using the internal oscillator? For example, if I put DEFINE OSC 20 at the top of my code (After @ DEVICE pic12f629, INT_OSC), will it run at 20 Mhz?

    2) Can I use one external oscillator for two PICs, or should they each have their own?

    Ross

  2. #2
    Join Date
    Dec 2003
    Location
    Wichita KS
    Posts
    511


    Did you find this post helpful? Yes | No

    Default

    Hello Ross,

    Ross>>1) pic12F629 has the capacity to be run at 20 Mhz - does that include using the internal oscillator? For example, if I put DEFINE OSC 20 at the top of my code (After @ DEVICE pic12f629, INT_OSC), will it run at 20 Mhz?<<

    The chip has the capacity to run at 20 MHZ, but the chip only as a internal OSC of 4 MHZ (The data sheet will give you this info)
    this means you must use a external OSC to go faster than 4MHZ, and set your programmer to ext OSC.

    Ross>>2) Can I use one external oscillator for two PICs, or should they each have their own?<<

    Never tried it... but the main problem you "might" have, is too much load on the OSC...resulting in Meltdown and temporary death to your computer...the only fix to such a death, is either using the internal OSC, or isolating your chip with a buffer from your Ext Osc.

    Dwayne
    Ability to Fly:
    Hurling yourself towards the ground, and missing.

    Engineers that Contribute to flying:
    Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute

    Pilots that are Flying:
    Those who know their limitations, and respect the green side of the grass...

  3. #3
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    See also:

    http://www.picbasic.co.uk/forum/show...ght=oscillator


    B.T.W.
    a simple search for "oscillator" would have taken you there.

    regards:
    Last edited by NavMicroSystems; - 9th August 2004 at 21:07.

  4. #4
    RossW's Avatar
    RossW Guest


    Did you find this post helpful? Yes | No

    Default

    I think I can use Method 1 from Melanie's post as there are only 2 pics in this design. Question: do I need any special defines to enable the OSC2 pin? I know I need at least:

    DEFINE OSC 20

    @ DEVICE 12f629, EXT_OSC


    Also, is using the OSC2 pin different than the CLKOUT? The datasheet says that it divides the frequency by 4 in the INTOSC or RC modes.

  5. #5
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    As per my original post you need the HS_OSC option because you are using an external xtal (for 20MHz). For the actual define for your PIC, I refer you to the FAQ section. CLKOUT is when you are using the internal 4MHz oscillator and you want the clock brought out from inside the PIC to the outside world.

  6. #6
    actionplus's Avatar
    actionplus Guest


    Did you find this post helpful? Yes | No

    Default Internal Clock

    How can set it up in the program to use the internal 4MHz of this PIC?

    DEFINE OSC INT??

  7. #7
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    You need to specify your PIC's oscillator type in the Configuration Fuse definitions for your PIC. See the FAQ about PIC Defines.

    You do not need any define OSC statements for PICBasic if you are going to run at 4MHz as this is the assumed default.

Similar Threads

  1. ADCIN question
    By Greg McFadden in forum General
    Replies: 4
    Last Post: - 16th September 2008, 02:53
  2. really simple, dumb question
    By picster in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 3rd March 2007, 22:02
  3. Question for a math guru
    By Christopher4187 in forum General
    Replies: 3
    Last Post: - 22nd November 2006, 09:45
  4. Please answer my first question
    By John_001 in forum Off Topic
    Replies: 1
    Last Post: - 15th September 2006, 06:49
  5. Timer / CCP Question
    By jamie_s in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 2nd November 2005, 08:22

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