Can I do like this?


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2006
    Location
    China
    Posts
    266

    Default Can I do like this?

    Hi,

    I am starting to use the 18F2550 USB pic but I have read the datasheet several times and still there are question marks.

    The plan is to get a low speed USB connection BUT still run the MCU core at 48MHz, it should be possible by using different clock sources for the MCU. This is because I need the MIPS but the computers it should connect to are not the newest ones, they might only have USB 1.0

    Since low speed USB always gets the clock from the primary souce I plan to put a 4 MHz crystal with 33 pF caps and that will after all internal PLL's and dividers give a nice clock for the USB. (page 30 in the datacheet)

    Then I must run the rest from the secondary source (Timer 1 oscillator). It it so simple that I can put a 48MHz crystal here and after the PIC has started on the primary clock just in my software switch to this source?

    What would the best capacitor value be for a 48MHz crystal? Any comments are very welcome since USB is a totally new thing for me and I usually run my PIC from oscillators.

    /me

  2. #2
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default Problem solved

    At best, a PIC can do "Full Speed" USB. Which is compatible with USB 1.1.
    So the old laptop should be fine. (said DT in an other post)

    So then I am on the track, just fit a 4 MHz oscillator and go for 48 MHz using PLL's.

    Thanks!!

    /me

  3. #3
    Join Date
    Jan 2007
    Posts
    70


    Did you find this post helpful? Yes | No

    Default

    if i understand you correct, you want to use usb and found that it requires a 48mhz clock... the way to get this from other oscillator settings is to use the PLL configs. I believe the PLL derives a 96mhz clock from your (4..20.. whatever) input... then you devide that by two. this is done with the config flags and one define..

    DEFINE OSC 48

    Do a search on 'USBDemo' and study that a bit... it taught me quite alot and ive just started with it.

    if i am wrong, i hope someone corrects me quickly

    hope it helps

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