Hi,
OK, I'll try this again:
When you're using the MikroE USB HID bootloader the CONFIG bits aren't written to device since doing so can make the bootloader it self stop working, basically bricking the board. The bootloader code (and the actual USB hardware in the PIC) relies on the fact that the PIC is running at 48MHz. IF the bootloader allowed itself to change the CONFIG it would sort of allow itself to commit suicide and you'd need to reload the bootloader into the chip using a normal device programmer. I'm 99.9% sure this is the case with the MikroE USB Bootloader as well.
This means that you changing to OSC = HS or trying to change the PLLDIV doesn't actually do anything to the operation of the device. It is and always has been running at 48MHz. I only said that IF the config bits where updated the default PBP config, with PLLDIV=5 isn't correct when using a 16MHz x-tal. But for that change to actually end up in the chip you'd need to use an actual device programmer.
I'm pretty sure that the sole thing that made it work in your case was specifying the correct oscillator frequency to the compiler, ie DEFINE OSC 48.
Yes, you're quite right. It means that the PLL is off by default but that it CAN - (because OSC = HSPLL) - be turned ON at runtime by setting OSCTUNE.6CONFIG CFGPLLEN = OFF ; PLL Disabled - doesn't this mean PLL is turned off?
If CFGPLLEN = ON then the PLL is permanently on and can not be turned off by software.
Does that make any sort of sense?
/Henrik.
Bookmarks