beautypg.com

4 calibrated internal rc oscillator, Atmega128rfa1 – Rainbow Electronics ATmega128RFA1 User Manual

Page 149

background image

149


8266A-MCU Wireless-12/09

ATmega128RFA1

To ensure sufficient startup time, the device issues an internal reset with a time-out
delay (t

TOUT

) after the device reset is released by all other reset sources. Section

"Power-on Reset" on page 177

describes the start conditions for the internal reset. The

delay (t

TOUT

) is timed from the Watchdog Oscillator and the number of cycles in the

delay is set by the SUTx and CKSELx fuse bits. The selectable delays are shown in

Table 11-2 below

. The frequency of the Watchdog Oscillator is voltage dependent as

shown in section

"Typical Characteristics" on page 510

.

Table 11-2. Number of Watchdog Oscillator Cycles

Typ Time-out

Number of Cycles

0 ms

0

4.0 ms

512

64 ms

8K (8,192)

Main purpose of the delay is to keep the AVR in reset until it is supplied with a stable
V

DEVDD

. The delay will not monitor the actual voltage and it will be required to select a

delay longer than the DEVDD rise time. If this is not possible, an internal or external
Brown-Out Detection (BOD) circuit should be used. A BOD circuit will ensure sufficient
V

DEVDD

before it releases the reset, and the time-out delay can be disabled. Disabling

the time-out delay without utilizing a Brown-Out Detection circuit is not recommended.

The oscillator is required to oscillate for a minimum number of cycles before the clock is
considered stable. An internal ripple counter monitors the oscillator output clock, and
keeps the internal reset active for a given number of clock cycles. The reset is then
released and the device will start to execute. The recommended oscillator start-up time
is dependent on the clock type, and varies from 6 cycles for an externally applied clock
to 32K cycles for a low frequency crystal.

The start-up sequence for the clock includes both the time-out delay and the start-up
time when the device starts up from reset. When starting up from Power-save or Power-
down mode, DEVDD is assumed to be at a sufficient level and only the start-up time is
included.

11.4 Calibrated Internal RC Oscillator

By default, the Internal RC Oscillator provides an approximate 16 MHz clock. The RC
oscillator is voltage and temperature dependent, but can be very accurately calibrated
by the user. See chapter

"Clock Characteristics" on page 502

and

"Internal Oscillator

Speed" on page 510

for more details. The device is shipped with the CKDIV8 Fuse and

the 1:2 system clock prescaler programmed. See section

"System Clock Prescaler" on

page 152

for more details.

This clock may be selected as the system clock by programming the CKSEL Fuses as
shown in

Table 11-3 on

page 150. If selected, it will operate with no external

components. During reset, hardware loads the pre-programmed calibration value into
the OSCCAL Register and thereby automatically calibrates the RC Oscillator. The
accuracy of this calibration is shown as Factory calibration in section

"Clock

Characteristics" on page 502

.

By changing the OSCCAL register (see

"OSCCAL – Oscillator Calibration Value" on

page 153

) from Software, it is possible to get a higher calibration accuracy than by

using the factory calibration. The accuracy of this calibration is shown as User
calibration in section

"Clock Characteristics" on page 502

.