Datasheet
29
ATtiny828 [DATASHEET]
8371A–AVR–08/12
To ensure stable operation of the MCU it is required to avoid sudden changes in the external clock frequency . A
variation in frequency of more than 2% from one clock cycle to the next can lead to unpredictable behavior. It is required
to ensure that the MCU is kept in Reset during such changes in the clock frequency.
Stable operation for large step changes in system clock frequency is guaranteed when using the system clock prescaler.
See “System Clock Prescaler” on page 30.
6.2.2 Calibrated Internal 8MHz Oscillator
The internal 8MHz oscillator operates with no external components and, by default, provides a clock source with an
approximate frequency of 8MHz. Though voltage and temperature dependent, this clock can be very accurately
calibrated by the user. See Table 104 on page 249 and “Internal Oscillator Speed” on page 293 for more details.
During reset, hardware loads the pre-programmed calibration value into the OSCCAL0 register and thereby
automatically calibrates the oscillator. The accuracy of this calibration is referred to as “Factory Calibration” in Table 104
on page 249. For more information on automatic loading of pre-programmed calibration value, see section “Calibration
Bytes” on page 229.
It is possible to reach higher accuracies than factory defaults, especially when the application allows temperature and
voltage ranges to be narrowed. The firmware can reprogram the calibration data in OSCCAL0 either at start-up or during
run-time. The continuous, run-time calibration method allows firmware to monitor voltage and temperature and
compensate for any detected variations. See “OSCCAL0 – Oscillator Calibration Register” on page 32, “Temperature
Measurement” on page 148, and Table 52 on page 150. The accuracy of this calibration is referred to as “User
Calibration” in Table 104 on page 249.
The oscillator temperature calibration registers, OSCTCAL0A and OSCTCAL0B, can be used for one-time temperature
calibration of oscillator frequency. See “OSCTCAL0A – Oscillator Temperature Calibration Register A” on page 33 and
“OSCTCAL0B – Oscillator Temperature Calibration Register B” on page 33.
When this oscillator is used as the chip clock, it will still be used for the Watchdog Timer and for the Reset Time-out.
Start-up time for this clock source is determined by the SUT fuse bit, as shown in Table 7 on page 30.
6.2.3 Internal 32kHz Ultra Low Power (ULP) Oscillator
The internal 32kHz oscillator is a low power oscillator that operates with no external components. It provides a clock
source with an approximate frequency of 32kHz. The frequency depends on supply voltage, temperature and batch
variations. See Table 105 on page 250 for accuracy details.
During reset, hardware loads the pre-programmed calibration value into the OSCCAL1 register and thereby
automatically calibrates the oscillator. The accuracy of this calibration is referred to as “Factory Calibration” in Table 105
on page 250. For more information on automatic loading of pre-programmed calibration value, see section “Calibration
Bytes” on page 229.
Start-up time for this clock source is determined by the SUT fuse bit, as shown in Table 7 on page 30.
6.2.4 Default Clock Settings
The device is shipped with following fuse settings:
z Calibrated Internal 8MHz Oscillator (see CKSEL fuse bits in Table 6 on page 28)
z Longest possible start-up time (see SUT fuse bits in Table 7 on page 30)
z System clock prescaler set to 8 (see CKDIV8 fuse bit on page 32)
The default setting gives a 1MHz system clock and ensures all users can make their desired clock source setting using
an in-system or high-voltage programmer.