ATAVRSB202 Atmel, ATAVRSB202 Datasheet - Page 31

no-image

ATAVRSB202

Manufacturer Part Number
ATAVRSB202
Description
KIT BATT MGMT FOR ATMEGA32HVB
Manufacturer
Atmel
Datasheets

Specifications of ATAVRSB202

Main Purpose
*
Embedded
*
Utilized Ic / Part
*
Primary Attributes
*
Secondary Attributes
*
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
9.7.3
8042B–AVR–06/10
Usage
The Slow RC oscillator represents a highly predictable and accurate clock source over the entire
temperature range and provides an excellent reference for calibrating the Fast RC oscillator run-
time. Typically, runtime calibration is needed to provide an accurate Fast RC frequency for
asynchronous serial communication in the complete temperature range.
The Slow RC frequency at 85°C and the Slow RC temperature coefficient are stored in the sig-
nature row. These characteristics can be used to calculate the actual Slow RC clock period at a
given temperature with high precision. Refer to
By measuring the number of CPU cycles of one or more prescaled Slow RC clock periods, the
actual Fast RC oscillator clock period can be determined. The Fast RC clock period can then be
adjusted by writing to the FOSCCAL register. The new Fast RC clock period after calibration
should be verified by repeating the measurement and repeating the calibration if necessary. The
Fast RC clock period as a function of the Slow RC clock period is given by:
where n is the number of prescaled Slow RC periods that is used in the measurement. Using
more prescaled Slow RC periods decreases the measurement error, but increases the time con-
sumed for calibration. Note that the Slow RC Oscillator needs very short time to stabilize after
being enabled by the OSI module. Hence, the calibration algorithm may use the time between
the first and second osi_posedge as time reference for calculations.
Another usage of OSI is determining the ULP frequency accurately. The ULP frequency at 85°C
and the ULP temperature coefficient are stored in the signature row, allowing the ULP frequency
to be calculated directly. However, the ULP frequency is less predictable over temperature than
the Slow RC oscillator frequency, therefore a more accurate result can be obtained by calculat-
ing the ratio between the Slow RC and ULP oscillators. This is done by sampling both the ULP
and Slow RC oscillators and comparing the results. When the ratio is known, the actual ULP fre-
quency can be determined with high accuracy. The ULP RC clock period as a function of the
Slow RC clock period is given by:
where n is the number of prescaled ULP RC and Slow RC periods that is used in the measure-
ment. Using more prescaled ULP RC and Slow RC periods decreases the measurement error,
but increases the time consumed for calibration. Note that the FOSCCAL register must be kept
at a constant value during this operation to ensure accurate results.
These clock period calculations should be performed again when there is a significant change in
die temperature since the previous calculation. The die temperature can be found using the Volt-
age ADC, refer to section
on page 117
for details.
T
T
FastRC
ULPRC
=
=
T
T
SlowRC
SlowRC
”Voltage ADC – 7-channel General Purpose 12-bit Sigma-Delta ADC”
------------------------------------------------------------------------------------------------------------------------------------------------ -
number of CPU cycles in n prescaled Slow RC periods
------------------------------------------------------------------------------------------------------------------------------------------------ -
number of CPU cycles in n prescaled Slow RC periods
number of CPU cycles in n prescaled ULP RC periods
”Slow RC Oscillator” on page 27
ATmega16HVB/32HVB
128 n ⋅
for details.
31

Related parts for ATAVRSB202