5.7 Oscillator Calibration

Figure 5-9. Oscillator Calibration

Oscillator Calibration Byte(s) for ATtiny and ATmega Parts

From the Advanced tab, you can read the Oscillator Calibration Byte(s) for ATtiny and ATmega parts. The oscillator calibration byte is a value that can be written to the OSCCAL register found in selected devices, to tune the internal RC Oscillator to run as close to a chosen clock frequency as possible.

Program

The oscillator calibration byte is stored in the device during manufacturing and can not be erased or altered by the user. Depending on the device, it is automatically transferred to the OSCCAL register during device start-up or set during program initialization. On devices where the application set it during program initialization, it must be transferred to FLASH or EEPROM first, using the programming dialog or the command-line tools.

Reading and Writing the Oscillator Calibration Byte for ATtiny and ATmega Parts

The calibration value is read from the storage in the device and shown in the Value text box by pressing the Read button.

The calibration byte is programmed into Flash or EEPROM memory by pressing the Write button. First, specify the memory type and address.