Sunday, 7 April 2019

RC Oscillator Vs Crystal Oscillator

RC Oscillators and Crystal Oscillators are so common in Embedded world. Nowadays most of the controllers are coming with inbuilt RC Oscillator. But still as most of the embedded geeks knows critical applications are going with crystal oscillator. Here it is a practical experiment which helps to understand the performance of both oscillators in detail.

This experiment is done by ST32F4 Discovery board. STM32F407VG is embedded in this board. It comes with an internal RC Oscillator of 16MHz. I have used this clock to create a system clock of frequency 8MHz. This clock is output at RCC_MCO2(Pin PC9). In order to do this experimen I enabled external crystal oscillator of 8MHz. This is output at RCC_MCO1(Pin PA8). The results is as follows.

In general both works fine, as shown abovr from both source 8MHz is output as expected.In this Channel 4 is RC oscillator and Channel 7 is Crystal Oscillator.

Now if we had a closure observation of RC Oscillator output  continuously, the fluctuation can be noted in its output while Crystal Oscillator output is stable.

In the above diagram in place of 8MHz , the output is disturbed. This fluctuation can be seen here in RC Oscillator output.
This shows the accuracy of crystal oscillator for normal operation.
Now let's see which is stable in faster.  In the below image, MCU is reset at the marked area.
It can be seen that the crystal oscillator takes really large time , more than 2 microsecond , to become stable. But in case of RC Oscillator(Channel 4) it can be seen that the output is become stable faster than crystal oscillator output.

This shows why for faster stabilization RC oscillator is preferable and continuous stability Crystal Oscillator is preferable.

No comments:

Post a Comment

RC Oscillator Vs Crystal Oscillator

RC Oscillators and Crystal Oscillators are so common in Embedded world. Nowadays most of the controllers are coming with inbuilt RC Oscilla...