20 MHz + PLL vs 48MHz


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154

    Default 20 MHz + PLL vs 48MHz

    What is the difference between using a 20 MHz crystal on a PIC 18F2550 running USB with this configuration:
    CONFIG PLLDIV = 5 ;Divide by 5 (20MHz input)
    CONFIG CPUDIV = OSC1_PLL2 ;[OSC1/OSC2 Src: /1][96MHz PLL Src: /2]
    CONFIG USBDIV = 2 ;Clock source from 96MHz PLL/2
    CONFIG FOSC = HSPLL_HS ;HS oscillator, PLL enabled, HS used by USB
    DEFINE OSC 48 ' 20 MHz crystal with HSPLL enabled

    and just using a 48 MHz crystal?

    Is it more efficient? Is extra cost the only difference?

    Also, what fuses would I need to change to use a 48 MHz crystal?

    Thanks!

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  2. #2
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    Demon, The reason for using a lower crystal frequency is to reduce the emitted rf from the oscillator circuit. The higher you go in main oscillator frequency the more possible harmonics you can produce thru the crystal circuit and the PCB traces.
    Dave Purola,
    N8NTA
    Last edited by Demon; - 4th October 2016 at 16:59.

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    in another hand, lower your crystal is, more you need to multiply it's value with the PLL... wich in some case may be a killer. PLL may and will drift with temperature change...more you multiply more it will drift.

    As now i didn't experiment too much problem with 20MHZ but i doubt one day i'll have. A real 48MHZ osc should be better but will probably never work good on a bread-board. Nothing is perfect.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Smile

    Quote Originally Posted by Demon
    What is the difference between using a 20 MHz crystal on a PIC 18F2550 running USB with this configuration: ... and just using a 48 MHz crystal?
    from datasheet: HS Oscillator mode max = 25 MHz

    Am I underdstanding what you are trying to do? If so, then 48 MHz Xtal is not a good option unless you like to overclock your devices.
    Last edited by Demon; - 4th October 2016 at 16:59.
    Paul Borgmeier
    Salt Lake City, UT
    USA
    __________________

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


    Did you find this post helpful? Yes | No

    Default

    EC mode can take 48mhz input.

    But it needs to be an external oscillator. Crystal won't work.
    <br>
    DT

  6. #6
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default

    Darrel,

    I got some 48 MHz HC49 crystals from DigiKey along with the recommended caps. Why do you say crystals won't work and it must be an external oscillator? If it's a 48 MHz crystal, I don't undestand what might be the problem.

    Or did you mean external RC won't work?

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

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


    Did you find this post helpful? Yes | No

    Default

    Like Paul said. 25mhz is the max spec for the HS oscillator.

    EC (External Clock) mode can take the 48mhz directly, but the chip can't generate it itself.

    There are so many oscillator modes on the 2550, it's pretty amazing. You can even get 48mhz from a 4mhz crystal.
    <br>
    DT

  8. #8
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default

    Exactly, hence why I'm not sure which is the most efficient to use. Let me put it this way, if your life depended on it, which one would you chose?

    - 20 MHz crystal boosted to 48 MHz using configuration settings.

    or

    - 48 MHz crystal.

    This is not for a personal project, my goal is to one day market this creature and reliability is important to me.

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

Similar Threads

  1. TSA5512/5511 code for PIC16F877/84
    By Marin in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 24th August 2013, 06:16
  2. 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
  3. Char. LCD and 18F452 on 20 MHz not work
    By samettin in forum General
    Replies: 11
    Last Post: - 28th July 2008, 09:59
  4. PIC18F2685 config settings for 20 MHz
    By wwilson17 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 31st March 2008, 23:13
  5. How to use a 20 MHz resonator on a 16F688
    By Thomas Williams in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 21st December 2005, 09:18

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