1. Vaughanabe13

    Thread Starter Active Member

    May 4, 2009
    102
    5
    I'm working with a PIC18F4550. I would like to use the PLL to boost the clock to 48MHz. I have done this before by using a 20 MHz resonator, dividing the CPU by 5 and then using PLL to multiply to 48 MHz. I know I can also do this with any resonator that is a multiple of 4 MHz. My question is, what is the difference (besides price) between using a 4MHz oscillator with no CPU division and PLL vs. a multiple-of-4MHz oscillator with CPU division and PLL?
     
  2. Vaughanabe13

    Thread Starter Active Member

    May 4, 2009
    102
    5
    Really? No advice? What about power consumption, would it be greater with a higher frequency?
     
  3. coldpenguin

    Active Member

    Apr 18, 2010
    165
    9
    Well I bookmarked this thread 'cos I was interested in the answer.
    My understanding is that the power consumption is greater with a higher frequency.
    On one of my projects I was powering it from a solar cell, so I want to make sure that I used as little current as possible. I use crystals all the time unless using an internal oscillator, so I probably loose power there. I am using a 48MHz crystal in this case. I think that the power used by the PIC for computation in my project is dwarfed by the switches (pullups) and DS1307 (which I could turn on and off I suppose when I need to communicate with it, but I don't want to risk stopping the chip)
    I have set my PIC to 'sleep()' for 8 tenths of every second, it is being worken by a DS1307 SQWE output. (i.e. it takes around 2 tenths of a second to do what it needs to do).
    However, in your case, I believe that you would be better using the slower crystal. My understanding is, that you can change the divider on the fly, thus over and under clocking the chip depending on what it is doing?
     
  4. Vaughanabe13

    Thread Starter Active Member

    May 4, 2009
    102
    5
    The oscillator type/speed is a configuration fuse setting, so you can't change it on the fly. However, it does give you more versatility if you use a frequency that the PIC cannot generate with the internal clock. i.e. If the PIC can already do 8MHz on the internal OSC, adding a 8MHz crystal doesn't give you any more options, whereas adding a 16MHz crystal gives you another operating frequency to work with, in addition to the PLL options. I ended up going with a 16 MHz resonator (I like resonators because of the built-in capacitors) but I think I could have used 8, 12, or 20 just as effectively. I'd still like to hear from anyone who has an answer on this.
     
Loading...