All about Occillators? Frequency/PLL?


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,624


    Did you find this post helpful? Yes | No

    Default Re: All about Occillators? Frequency/PLL?

    Hi,
    I've never used USB (tried once, couldn't get it to work) but here's my interpretation of the figure in the previous post.

    If you connect a 4MHz x-tal to the PIC you need to set the PLL-prescaler (PLLDIV) to divide by 1 (PLLDIV=000) because the 96MHz PLL expects 4MHz input in order to generate 96MHz output - it even says 4MHz input only. Had it been a 8MHz x-tal, you'd set the PLL prescaler to divide by 2 in order to feed 4MHz to the downstream PLL circuitry. Note that you are indeed dividing the input frequency in order to get the needed 4MHz input to the PLL which is THEN multiplying that 4MHz signal in order to get 96MHz.

    The 96MHz output signal from the PLL is then divided by 2 to generate 48MHz that can be used for the USB peripheral provided USBDIV=1 and FSEN=1. So far we haven't really touched the CPU clock....

    Now you have the option the derive the CPU clock from the 96MHz signal by using the PLL postscaler (ie set your CONFIG to XTPLL mode etc) OR "directly" from your 4MHz oscillator by using the Oscillator postscaler (ie set your CONFIG to XT or HS mode etc).

    If you use XT mode you'd set the Oscillator Postscaler to divide by 1 and DEFINE OSC 4 (that's the maximum you can get that way). If you use XTPLL mode you could, for example, set PLL postscaler to divide by 2 and DEFINE OSC 48.

    That's how I read the schematic, I'm open for corrections!

    /Henrik.

  2. #2
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: All about Occillators? Frequency/PLL?

    Absolutely correct, Henrik and a nice clear explanation - at least that's how it seems to work in the projects I've done. The PLL does a fixed multiply by 24. PLL's can distort the shape of the square wave coming out of them (the high time might be different than the low time) so you make it run twice as fast as needed, then divide by 2 afterwards to make the shape nice and symmetrical again.

Similar Threads

  1. Pll?
    By atwoz in forum General
    Replies: 2
    Last Post: - 19th December 2007, 11:20
  2. control a PLL for FM
    By savnik in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 24th October 2006, 12:18
  3. 20 MHz + PLL vs 48MHz
    By Demon in forum General
    Replies: 14
    Last Post: - 31st July 2006, 13:02
  4. Hs Pll
    By Ron Marcus in forum Off Topic
    Replies: 2
    Last Post: - 21st February 2006, 01:34
  5. PLL Frequency Synthesizer
    By actionplus in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 26th March 2005, 08:34

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