Quote Originally Posted by flotulopex View Post
Hello,

Is it possible to change the OSC speed and type (from Xtal to Internal Oscillator) during the program's execution within the program (=originated by the program, not by an external switch)?

In other words, can I start my application using a 20MHz Xtal and then, after some operation needing this "high" speed, I can switch over to the internal 4MHz oscillator?
As the others have said, you can, depending on the pic. To change the internal clock speed (typically they range from 31kHz to 8MHz) with most pic's it is the osccon register. You'll have to read the datasheet on your specific pic to know what it can do, and how to do it. They usually have a section on the Oscillator.