18F4550 pri osc & tmr1 question (proberbly stupid)


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

    Default 18F4550 pri osc & tmr1 question (proberbly stupid)

    ok, 24MHz HS xtal for master osc... Not using USB atm...
    I'm selecting my OSC as HSPLL with PLL devision 6 and MCU clock devision _2 which acording to the datasheet gets me 48MHz...

    Now, i come to checking the setup of TMR1... on the 877A i used one of the PWM's to provide a usable input source... TMR is used to calculate RPM based on software triggerging...

    The bit thats confused me is internal clock FOSC...
    Is FOSC the 24mhZ HS XTAL

    or

    Is it the derived 48MHz?

    OR

    Is it the onboard oscilator?

    Selecting clock sources has confused the hell out of me between internal and external clocks... Acording to the datasheet, TMR1 has a 32KHz on chip oscilator... but i can only find reference to adding a 32KHz LP xtal...

    Also, is the TMR1 prescaler, a multiply or devide? Looks like multiply to me...

    I'd like tmr1 to have a 32Khz clock from it's internals without having to add on another xtal...

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


    Did you find this post helpful? Yes | No

    Default

    The oscillators on the USB chips are extremely versatile.
    You could do all the things you suggested.

    With a 24Mhz crystal ...
    You can have both the USB module and the CPU running from 48Mhz.
    Or the CPU could be at 24, 12, 8 or 4 Mhz while the USB still gets 48.

    You could also run the CPU from the internal oscillator at 8Mhz, while the USB module gets 48 Mhz from a 4Mhz crystal.

    So many options you can't list them all.

    I'd like tmr1 to have a 32Khz clock from it's internals without having to add on another xtal...
    Now that ... you can't do.
    But you can use the FOSC/4 from the CPU's clock.
    Not as accurate as a Watch Crystal, especially when running at 48Mhz.

    However, you'll need PBP 2.46 or higher to use 18F4550's with USB.
    <br>
    DT

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Ahh foo!

    Thanks Darrel

Similar Threads

  1. 16f877A and tmr1 external crystal question
    By comwarrior in forum General
    Replies: 3
    Last Post: - 13th July 2009, 00:40
  2. Internal Osc question.
    By muddy0409 in forum General
    Replies: 4
    Last Post: - 31st August 2008, 17:01
  3. Stupid array question
    By RUBiksCUbe in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 4th September 2006, 16:03
  4. TMR1 question
    By yasser hassani in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 7th May 2006, 01:44
  5. 12f675 internal osc question.....
    By Gabe@SPdFtsh in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 6th January 2004, 06:33

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