1) why we using oscillators in microcontrollers?
2) how we can select oscillators ?
3) why we using capacitors along with oscillator with controllers?
4) how oscillators affect the controllers with respect to programs?
1) why we using oscillators in microcontrollers?
2) how we can select oscillators ?
3) why we using capacitors along with oscillator with controllers?
4) how oscillators affect the controllers with respect to programs?
There is a major difference between an oscillator and a crystal.
Oscillators are typically self contained entities which when properly powered provide a stable clock source.
A typical canned oscillator:
Crystals are discrete components which under proper conditions resonate and are typically incorporated into an oscillator:
Crystals in conjunction with a pair of capacitors and other components within the microcontroller form an oscillator.
The oscillator provides a stable clock source which drives the logic within the microcontroller at a predictable and stable rate.
The rate at which a microcontroller executes instruction is based on a particular number of system clock cycles, otherwise known as instruction cycles.
The following document discusses in detail the operation of a crystal based oscillator in regards to a microcontroller:
Unfortunately, there's not an internal oscillator in pic16f877a.If you want you can use just a resistor and capacitor and tie it to the oscillator IN pin,but only use this if your application don't need a precision timing.