38
7799D–AVR–11/10
ATmega8U2/16U2/32U2
lator is selected by the fuse bits configuration. The firmware has to check if the clock is correctly
started before selected it.
8.11.2
CLKSEL1 – Clock Selection Register 1
Bit 7:4 – RCCKSEL[3:0]: CKSEL for RC oscillator
Clock configuration for the RC Oscillator. After a reset, this part of the register is loaded with the
0010b value that corresponds to the RC oscillator. Modifying this value by firmware before
switching to RC oscillator is prohibited because the RC clock will not start.
Bit 3:0 – EXCKSEL[3:0]: CKSEL for External oscillator / Low Power Oscillator
Clock configuration for the External Oscillator / Low Power Oscillator. After a reset, if the Exter-
nal oscillator / Low Power Oscillator is selected by fuse bits, this part of the register is loaded
with the fuse configuration. Firmware can modify it to change the start-up time after the clock
switch.
8.11.3
CLKSTA – Clock Status Register
Bit 7:2 - Res: Reserved bits
These bits are reserved and will always read as zero.
Bit 1 – RCON: RC Oscillator On
This bit is set by hardware to one if the RC Oscillator is running.
This bit is set by hardware to zero if the RC Oscillator is stoped.
Bit 0 – EXTON: External Oscillator / Low Power Oscillator On
This bit is set by hardware to one if the External Oscillator / Low Power Oscillator is running.
This bit is set by hardware to zero if the External Oscillator / Low Power Oscillator is stoped.
8.11.4
OSCCAL – Oscillator Calibration Register
Bits 7:0 – CAL[7:0]: 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
Bit
7
6
5
4
3210
RCCKSE
L3
RCCKSE
L2
RCCKSE
L1
RCCKSE
L0
EXCKSE
L3
EXCKSE
L2
EXCKSE
L1
EXCKSE
L0
CLKSEL1
Read/Write
R/W
Initial Value
0
1
0
0000
Bit
7
6
5
4
3210
-
RCON
EXTON
CLKSTA
Read/Write
R
Initial Value
0
See Bit Description
Bit
76543210
CAL7
CAL6
CAL5
CAL4
CAL3
CAL2
CAL1
CAL0
OSCCAL
Read/Write
R/W
Initial Value
Device Specific Calibration Value