How to use a 20 MHz resonator on a 16F688


Closed Thread
Results 1 to 3 of 3
  1. #1
    Thomas Williams's Avatar
    Thomas Williams Guest

    Question How to use a 20 MHz resonator on a 16F688

    Question: what are the settings to fire up a 20 MHz resonator instead of the onboard clock?

    right now I have the OSCCON = &70 for 8 Mhz but am missing the documentation where there is a 20 MHZ switch?

    thanks for andy help.

    PS how would you verify a 20 MHz operation being functional. which pin to verify with ocilloscope. thanks

  2. #2
    Join Date
    Feb 2005
    Location
    Essex, UK
    Posts
    154


    Did you find this post helpful? Yes | No

    Default

    Define Osc 20

  3. #3
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Thomas Williams
    PS how would you verify a 20 MHz operation being functional. which pin to verify with ocilloscope. thanks
    Hi,

    With the code below you should see the light of the LED 60 times in 1 minute.
    Just count and check your watch. (The LED is ON for 500 ms and OFF for 500 ms).

    Remember to add to your code "Define Osc 20" and set as output the pin where the LED is connected.

    Best regards,

    Luciano

    Code:
            Low PORTB.0    ' Turn off LED connected to PORTB.0
    
    
    loop:   Toggle PORTB.0  ' Toggle the LED connected to PORTB.0
            Pause 500       ' Delay for 500 milliseconds
            Goto loop       ' Go back to loop and blink LED forever
    
            End
    Example with LED. (Your board will have a different oscillator).

Similar Threads

  1. Setting up a 12F683 to run at 20 Mhz
    By johnnylynx in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 3rd March 2009, 02:46
  2. Char. LCD and 18F452 on 20 MHz not work
    By samettin in forum General
    Replies: 11
    Last Post: - 28th July 2008, 09:59
  3. PIC18F2685 config settings for 20 MHz
    By wwilson17 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 31st March 2008, 23:13
  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. 20 MHz + PLL vs 48MHz
    By Demon in forum General
    Replies: 14
    Last Post: - 31st July 2006, 12:02

Members who have read this thread : 1

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