Datasheet

33
ATmega16U4/32U4 [DATASHEET]
Atmel-7766J-USB-ATmega16U4/32U4-Datasheet_04/2016
register to change the oscillator frequency. The calibration range is ±40% and linear (calibration step ~0.4%).
With typical process at 25°C the code should be 127 for 8MHz. Input value of 0x00 gives the lowest frequency,
and 0xFF the highest.
The temperature sensitivity is quite linear but as said previously depends on the process. To determine its
slope, the frequency must be measured at two temperatures. The temperature sensor of the device allows such
an operation, that is detailed on “Sensor Calibration” on page 304. It is then possible to calibrate the oscillator
frequency in function of the temperature measured.
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.8 MHz. Otherwise, the
EEPROM or Flash write may fail.
6.5.2 Oscillator Control Register – RCCTRL
Bits 7..1 – Reserved
Do not set these bits. Bits should be read as ‘0’.
Bit 0– RCFREQ: RC Oscillator Frequency Select
When this bit is cleared (default value), the RC Oscillator output frequency is set to 8MHz. When the bit is set,
the RC output frequency is 1MHz. Note that the OSCCAL value has the same effect on both 8MHz and 1MHz
output modes (~0.4% / step).
6.6 External Clock
The device can utilize a external clock source as shown in Figure 6-3. To run the device on an external clock,
the CKSEL Fuses must be programmed as shown in Table 6-1 on page 28.
Figure 6-3. External Clock Drive Configuration
When this clock source is selected, start-up times are determined by the SUT Fuses as shown in the table
below.
Bit 76543210
- - - - - - - RCFREQ RCCTRL
Read/WriteRRRRRRRR/W
Initial Value00000000