WARNING RC Accuracy Mega 48/88/168 is 10%!

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

In the first datasheets (befory july 2005) of the mega 48 etc the initial accuracy of the internal RC osc was stated at +/-1% at 3V 25 degr. The first series of the chips were OK. With a recent batch there was a 7% deviation.
The applications -7 different programs!- didn't work anymore.

In the most recent version of the datasheet the accuracy is 10%!!

So if you are using the 1% feature of the mega's just like we did you can be just as thankful to atmel as we are

Dig Kleppe

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

Can the oscillator be fine tuned?
I sure hope so.. I just bought 25 of the m168 pieces.

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

I may not know what I'm talking about...but...

There is a callibration byte that you can set. As for the 10%, the actual range would depend on the temperature and voltage variations. Controlling these will help some after you set the callibration byte.

Andy Out!

P.S. "Thank You" to the tech who beat "use an external crystal - RC osciallators are BAD" into my skull.

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

The default calibration byte in the signature space is guaranteed to provide 10% accuracy out of the box.

The datasheet goes on to state that you can fine-tune the oscillator calibration to within 2% accuracy by modifying the OSCCAL register.

Atmel Appnotes AVR053, AVR054 and AVR055 (and related code examples) provide some techniques for fine-tuning the internal RC oscillator.

AVR053 is based on calibration at programming-time using an STK500 or AVRISP.

AVR054 is based on firmware that interprets special signals from the UART to calibrate the oscillator.

AVR055 discusses using an external precision 32.768 kHz crystal to provide run-time calibration of the oscillator, such that it will remain stable over varying temperatures and voltages.

Note to OP:
Please delete the cross-posted version of this note in the AVR GCC forum. It is sufficient to post it once in one forum; those who are interested will find it here. If you check out the cross-posted message before anybody else responds to it, then you'll be allowed to delete it. Otherwise, you could ask a forum moderator to delete it and/or merge its responses with this thread.

- Luke