Oscillator Selection


Closed Thread
Results 1 to 6 of 6
  1. #1

    Default Oscillator Selection

    I'm looking to implement USB programming of one of our products and I am a little confused about which oscillator frequency I need to use. The data sheet says something about 48 MHz is required for full speed USB and only 6 MHz for low speed USB. Is this the same as USB 2.0 and USB 1.1? Can I run a 6 MHz oscillator if I only need to use USB 1.1 speeds?

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

    Default

    I never tried it myself, but have a look to USB.TXT
    The USB header files for these PICs are set for a default oscillator of 20MHz.
    The other settings for full-speed USB are HSPLL, USB clock is 96MHz PLL / 2
    and system clock postscaler is divided by 2. For low-speed USB operation,
    the main changes are to set the system clock postscaler to divide by 4 and
    change the define for UCFG_VAL in the descriptor file for the project. The
    sample project descriptor files show settings of UCFG_VAL for both full-
    speed and low-speed. With these settings, for full-speed, the PIC core runs
    at 48MHz. For low-speed, the PIC core runs at 24MHz.
    You can run @ full speed using a simple 4MHz crystal, look USBDemo.

    HTH
    Steve

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

  3. #3

    Default

    Steve,

    Thanks for the quick reply. Just out of curiosity why would someone want to use a 4 MHz oscillator instead of say a 40 or a 20 MHz?

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

    Default

    Those USB PIC have a oscillator block that divide anything (well not on all mode but) down to 4MHz, then the internal PLL rise it up to 96Mhz, then you divide it /2 to have your expected 48MHz processor speed.

    So why using 20MHz (or else) instead of 4? I no longer see of any good reason apart if, for some reason, you have a bunch of those already in stock.
    Steve

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

  5. #5

    Default

    The PIC that was are looking to use is the 18F2550. We don't need a many I/O, just a handful and a USB port. The only reason I could possibly think to use a faster oscillator is for better accuracy. Does it not make sense that to say an oscillator running at 4 MHz +/-50 ppm will be less accurate than one running at 20 MHz +/- 50 ppm due to multiplying less to achieve the same results?

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

    Default

    This is what i thought as well... but it's still divided down to 4MHz at the end... and you still have +/- 50 ppm at the end too.

    We already talked about that here a while back

    http://www.picbasic.co.uk/forum/show...5&postcount=11
    Steve

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

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