XTAl using 18F4550


Closed Thread
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Posts
    747

    Default XTAl using 18F4550

    HI,
    I am trying to use external oscillation on a P18F4550. The spec sheet says to use 15pF caps. But it is not operating at 20Mhz. With the code I used below. the only config thats works and I can confirm on the oscilloscope is using a 10Mhz crystal with 20pF caps. ( but config at OSC 20)
    Tried multitude of capacitors values with the 20Mhz crystals. Any ideas ?

    Code:
    OSCCON = %01111100 
    DEFINE OSC 20
    K

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


    Did you find this post helpful? Yes | No

    Default Re: XTAl using 18F4550

    OSCCON only affects the internal oscillator.

    With a 20Mhz crystal and the default configuration bits, the processor will be running at 48Mhz.

    DEFINE OSC 48
    DT

  3. #3
    Join Date
    Sep 2006
    Posts
    747


    Did you find this post helpful? Yes | No

    Default Re: XTAl using 18F4550

    ok thank you, osc 48 works, but where does it say to write this when using a 20Mhz crystal ?

    K

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


    Did you find this post helpful? Yes | No

    Default Re: XTAl using 18F4550

    It says it in the default configuration bits (18F4550.inc) when compared to the oscillator structure on those USB chips.

    The only way to understand why, is to read (study) the datasheets Oscillator Configurations section.

    The oscillators in the USB chips are very different from any of the other PIC families.

    http://ww1.microchip.com/downloads/e...Doc/39632e.pdf
    DT

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