PIC 18f452 and 40MHz

Discussion in 'Embedded Systems and Microcontrollers' started by shoka, Apr 27, 2009.

  1. shoka

    Thread Starter Active Member

    Mar 12, 2009
    does pic 18f452 works with a crystal of 40 mhZ?
    i see on the sites that it can work with a 10 MHz crystal with PLL to multiply the frequency by 4?i don't get it .

  2. t_n_k

    AAC Fanatic!

    Mar 6, 2009
    The maximum usable crystal frequency possible for that PIC is 25MHz.

    The single instruction cycle interval is 4 times the oscillator period - not 4x the frequency.

    So at 25MHz the oscillator period is 40 nanoseconds. One instruction clock cycle is then 4x40 or 160 nanoseconds.
  3. AlexR

    Well-Known Member

    Jan 16, 2008
    As tnk said the maximum crystal frequency that the 18F452 (and other members of the PIC18 family) handle using the internal HS oscillator is 25 MHz.

    The chip can however be configured to use an internal PLL X4 frequency multiplier that allows 4MHz to 10Mhz crystals to be multiplied up to give an effective clock frequencies of 16MHz to 40MHz.

    In other word when used a s straight oscillator the max xtal and clock frequency is 25MHz
    When used with the X4 PLL the max xtal frequency is 10MHz which translates to a clock frequency of 40MHz.
  4. shoka

    Thread Starter Active Member

    Mar 12, 2009
    thanks t n k and AlexR , i get it and it works on protesue , i hope it works on real hardware