Calibration of internal RC oscillator !!

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hello all,..

Sorry but i want to ask some questions about calibration feature for internal RC oscillator (Atmega32 MC)

why we must do calibration for each frequency selected (2,4,8 MHZ)??

i read the calibration part in the data sheet but can't understand why we do that?

and if i want to choose an internal freq of 8MHZ how i can calibrate it with the correct value to osccal register??

Thanks in advance,..

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
why we must do calibration for each frequency selected (2,4,8 MHZ)??

Because the calibration factor that works for one frequency may not work with other frequencies.
Quote:
i read the calibration part in the data sheet but can't understand why we do that?

Because the calibration of the RC oscillator done at the factory is only guaranteed to be within a certain accuracy (and that calibration is only done on the default frequency). If you need something more accurate than that, you need to calibrate it yourself.
Quote:
and if i want to choose an internal freq of 8MHZ how i can calibrate it with the correct value to osccal register??

Read application note AVR053 for the specifics on how to do it.

Regards,
Steve A.

The Board helps those that help themselves.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thank Koshchi for your reply ,..

I downloaded AVR053 and i am reading it now but want to ask what is meant by " calibrating the RC oscillator to a given frequency within 10% of the base frequency" ??

plz give me an example with any oscillator value,..

i want to understand that :(

sorry another add if i don't want to calibrate the internal RC oscillator how can i get the factory calibration for 8 MHZ, can i get it from ponyprog (command -> Read osc calibration byte) ??

thanks,..

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

black-code wrote:
sorry another add if i don't want to calibrate the internal RC oscillator how can i get the factory calibration for 8 MHZ, can i get it from ponyprog (command -> Read osc calibration byte) ??

thanks,..

Channeling Yogi Berra: If you don't want to calibrate the rc oscillator, forget about it.

The good thing about the RC oscillator is that it is cheap and starts up quickly. The not good thing is that it varies with temperature and supply voltage by up to +/- 10%. That is a problem if you are using RS-232 which requires that the baud rate to be accurate to 2%.

If having the 8MHz +/- 10% clock works in your application, just ignore calibration (do nothing).