
Here is an app note from Microchip describing how to design oscillator circuits for your PIC projects. The article advises designers to think about the conditions the project will be used in and design their oscillator circuits accordingly. Also provided are examples how to test and tweak the oscillator circuit to get the best result.
Oscillator design requires knowing the operating conditions under which the oscillator will function, followed by testing to ensure that it will actually function as expected. The design phase involves component selection, sometimes guided by initial testing. The testing phase tests oscillator performance, either by
testing actual operation under the previously specified conditions or by ensuring that there is sufficient gain margin to allow start-up and operation under all conditions. Several other factors, such as circuit board layout, signal levels and crystal and resonator concerns, are also discussed and may be helpful
during the design phase.
