doubt in pic18f4550 working

Discussion in 'Embedded Systems and Microcontrollers' started by ashrok, Mar 6, 2009.

  1. ashrok

    Thread Starter Member

    Feb 22, 2009
    13
    0
    hi,
    I'm newbie using microcontrollers.I was going thro' pic18f4550 datasheet.
    I found the "flexible clock structure" confusing. it says
    Five Crystal modes, including High-Precision PLL
    for USB
    • Two External RC modes, up to 4 MHz
    • Two External Clock modes, up to 40 MHz
    • Internal oscillator block:
    - 8 user selectable frequencies, from 31 kHz to 8 MHz
    - User tunable to compensate for frequency drift
    • Secondary oscillator using Timer1 @ 32 kHz

    I'm supposed to get data from a ADC-ads7888 serially giving a serial clk of 25Mhz.
    All i wanna know is if i can use a crystal of 40Mhz for the pic18f and
    derive 25Mhz by programming(toggling a port with some delay corr to 25Mhz) for the ADC Sclk.


    thanks in advance,
    A

    I'd appreciate more if any1 could help me comprehend the text in bold
     
  2. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
  3. ashrok

    Thread Starter Member

    Feb 22, 2009
    13
    0
    hi mik3.
    i read the datasheet oscillator part.
    is what i say b'lo correct?:confused:?
    using a 20mhz xtal and setting divide factor by 5 , we get 4mhz for pll and again dividing 96mhz by 2 we get clk for usb operation as 48mhz.
    for cpu clock too shd we use the same oper freq = 48mhz.?
    (i am using the mcu for usb communication with pc in full speed mode)

    kindly reply..

    thank u,
    ashrok
     
  4. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    You can use an external crystal for the USB and the internal oscillator for the PIC if you want.
     
Loading...