Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Mega162 RC oscillator way off calibration

2006-07-04 by Tim Mitchell

I'm using a Mega162 for the first time... It should have an 8MHz
calibrated RC oscillator, but actually it's running at 8.45MHz which is
making the UART communications fail. 

I've used Tinys before where you have to write your own calibration
byte, but the data sheet seems to suggest that Atmel write the
calibration value for you in the Megas - and the chip loads the OSCCAL
itself on boot up. Is this correct? The data sheet is not clear on
whether the calibration value is preloaded into the flash at the
factory.

I can calibrate it to 8MHz myself by writing a different value to
OSCCAL. I've used Mega8's and Mega16's lots before and the RC oscillator
has always been spot on, or near enough to not matter.
Any suggestions why the freq is so way off?


-- 
Tim Mitchell
tim@sabretechnology.co.uk
http://www.sabretechnology.co.uk

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.