PDA

View Full Version : How accurate is the internal oscillator ?



lilimike
- 13th May 2010, 00:24
Actually my question would be how big of a gap in term of precision between internal oscillator and a resonator at 4 MHz?

I am wondering if I can just remove the external part, save some space and the cost of the part.
I don't need a long term calculation such as an alarm clock, I am just calculating distance using ultrasonic and I don't need precise distances. I only need to compare distance differences in units as long as during my comparison my units are identical.

Mike

Charles Linquis
- 13th May 2010, 01:23
It all depends on the device. Some of the old 16F parts weren't very accurate at all. Most all the 18F parts have better than 1% accuracy - even over a wide temperature range. Your datasheet will tell you.

rsocor01
- 13th May 2010, 01:42
lilimike,

For example, a PIC18F4550 has a +/- 2% internal frequency variation at room temperature (25 deg. C). This is according to the datasheet, electrical characteristics section. However, these chips are calibrated in the factory and the 2% is just the worst case scenario. The accuracy in frequency is ussually pretty good.

A typical 4MHz crystal can have a frequency tolerance of +/- 30 ppm at room temperature. This is equivalent to +/- 0.003% in frequency variation.

For the type of application that you want, the internal oscillator should be good enough.

Robert

lilimike
- 13th May 2010, 02:31
I am using a 16F628A.
I did see the datasheet but I was not sure exactly how to interpret it.

Even with temperature change as long as there is no drastic change within a few seconds I should still be ok.

Thank you for the information.

Mike

rsocor01
- 13th May 2010, 02:43
The next sentence is from the 16F628A datasheet page 1.


Precision internal 4 MHz oscillator factory
calibrated to ±1%

Check page 153 of the datasheet for the graph "TYPICAL INTERNAL OSCILLATOR FREQUENCY vs. TEMPERATURE, VDD = 5 VOLTS".

Robert

lilimike
- 13th May 2010, 05:06
yes I see, looking at the graph is more clear.

Thank you