PIC12F675 at 20MHz ?? (Pic Basic Pro Compiler)


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default Re: PIC12F675 at 20MHz ?? (Pic Basic Pro Compiler)

    The internal oscillator is set at 4MHz. But if you want 20MHz, then you need to sacrifice two pins, GPIO4 and GPIO5 to be used as Crystal connections for the High Speed oscillator.

    Or you can drive the GPIO5 pin with an external can oscillator. See page 53 of the datasheet.

    The settings for all above is in the CONFIG word during programming of the chip (page 52 of the datasheet).

    Ioannis

  2. #2
    Join Date
    Feb 2022
    Posts
    54


    Did you find this post helpful? Yes | No

    Default Re: PIC12F675 at 20MHz ?? (Pic Basic Pro Compiler)

    Hi ioannis.
    Ok, well seen.
    The internal oscillator being 4MHz and if we want to work with a definition at 20mHz, an external quartz is then necessary.
    This one connecting to GPIO4 and GPIO5 ... which are indeed well provided for this use!
    Which had actually escaped me. (
    I will review my program by considering this precious information.
    Thank you again and have a good week everyone!

  3. #3
    Join Date
    Feb 2022
    Posts
    54


    Did you find this post helpful? Yes | No

    Default Re: PIC12F675 at 20MHz ?? (Pic Basic Pro Compiler)

    So, I then have a few questions left about this command define OSC:

    1_The "DEFINE OSC 20" command would only make sense if you really use a 20mHz quartz?

    2_With a 20mHz quartz, is the simple fact of configuring the fuse "OSC HS" sufficient? Or will we also have to add the DEFINE OSC 20 command in the program?

    3_ The fact that the manual specifies that the DEFINE command can be used to change the predefined value of the oscillator makes you think that it is not necessary to use a quartz to actually work at 20mHz ...

    4_ Without Quartz What would the impact of the DEFINE OSC 20 order? The timing unit for Pulsin, Pulsout and Pause commands would still be modified?


    Thanks

  4. #4
    Join Date
    Aug 2011
    Posts
    453


    Did you find this post helpful? Yes | No

    Default Re: PIC12F675 at 20MHz ?? (Pic Basic Pro Compiler)

    The ONLY thing the DEFINE OSC command does is inform the compiler what clock speed you're running at so it can adjust various internal timings.

    It's completely up to you to set the CONFIG and any runtime settings (OSCCON, etc) that may be required to get you that speed.

  5. #5
    Join Date
    May 2013
    Location
    australia
    Posts
    2,642


    Did you find this post helpful? Yes | No

    Default Re: PIC12F675 at 20MHz ?? (Pic Basic Pro Compiler)

    there is a manual that answers just about every question available here


    eg
    4_ Without Quartz What would the impact of the DEFINE OSC 20 order? The timing unit for Pulsin, Pulsout and Pause commands would still be modified?
    Name:  zorb.jpg
Views: 1277
Size:  216.5 KB
    Warning I'm not a teacher

Similar Threads

  1. Pic Basic Compiler
    By engr_israr40 in forum General
    Replies: 5
    Last Post: - 29th April 2007, 15:33
  2. PIC BASIC Compiler pbc:- Help!
    By timmoore47 in forum mel PIC BASIC
    Replies: 5
    Last Post: - 5th February 2007, 16:58
  3. Replies: 5
    Last Post: - 17th January 2006, 19:26
  4. PIC Basic Pro Compiler
    By iclok in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 25th November 2005, 03:22
  5. How to learn PIC BASIC compiler in 7 days?
    By luqman83salleh in forum General
    Replies: 2
    Last Post: - 13th August 2004, 14:15

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