Oscillator Calibration Register
Name:
OSCCAL
Offset:
0x66
Reset:
Device Specific Calibration Value
Access:
-
Bit76543210
CAL [7:0]
AccessR/WR/WR/WR/WR/WR/WR/WR/W
Resetxxxxxxxx

Bits 7:0 – CAL [7:0]: Oscillator Calibration Value

Oscillator Calibration Value

The Oscillator Calibration Register is used to trim the Calibrated Internal RC Oscillator to remove process variations from the oscillator frequency. A pre-programmed calibration value is automatically written to this register during chip reset, giving the Factory calibrated frequency as specified in the Clock Characteristics section of Electrical Characteristics chapter.. The application software can write this register to change the oscillator frequency. The oscillator can be calibrated to frequencies as specified in the Clock Characteristics section of Electrical Characteristics chapter.. Calibration outside that range is not guaranteed.

Note that this oscillator is used to time EEPROM and Flash write accesses, and these write times will be affected accordingly. If the EEPROM or Flash are written, do not calibrate to more than 8.8MHz. Otherwise, the EEPROM or Flash write may fail.

The CAL7 bit determines the range of operation for the oscillator. Setting this bit to 0 gives the lowest frequency range, setting this bit to 1 gives the highest frequency range. The two frequency ranges are overlapping, in other words a setting of OSCCAL=0x7F gives a higher frequency than OSCCAL=0x80.

The CAL[6:0] bits are used to tune the frequency within the selected range. A setting of 0x00 gives the lowest frequency in that range, and a setting of 0x7F gives the highest frequency in the range.