Hi Sam,
No. These are "config fuse" settings. You set them by adding the config directive to your code, editing the 18F4550.INC file in your PBP directory, or select them with your programmers software before programming the part.
Look at the clock diagram in your 18F4550 data sheet so you can follow this;
PLLDIV=5 divides the 20MHz crystal input x5 for 4MHz output on the PLL Prescaler.
Note where it shows (4MHz input only) to the 96MHz PLL block? That's why you use the PLL prescaler. The output can only be 4MHz no matter what the primary oscillator speed is when it's input to the HS PLL.
CPUDIV=OSC1_PLL2 divides the 96MHz PLL input to the PLL Postscaler x2 to provide 48MHz system clock to the CPU core.
FOSC = HSPLL_HS simply enables the high-speed PLL clock multiplier.
These are only available at program time, and can only be configured at the time you initially program the PIC.
DEFINE OSC 48, 20, etc, does nothing but inform PBP as to the osc clock frequency you're using so it can internally adjust/include PBP library functions to work at the specified clock speed.
I won't re-hash something Melanie has already covered, so take a peek at this thread; http://www.picbasic.co.uk/forum/showthread.php?t=543
The new USB parts definitely have a boat-load of oscillator options, but once you get the hang of it, they are really fun to mess with.
If you're still confused after reading Melanies thread & comparing the above to the data sheet let me know.




Bookmarks