AVR055 - Using a 32 kHz crystal to calibrate the internal RC oscillatore Documentation

Atmel AVR Application Note

Introduction

This documents data structures, functions, variables, defines, enums, and typedefs in the software for application note AVR055.

Compilation Info

This software was written for the IAR Embedded Workbench 4.11A.

To make project:

  1. Add the file calib_32kHz.c to project.
  2. Under processor configuration, select any device listed in the device_specific.h file.
  3. Memory size: Small
  4. Enable bit definitions in I/O include files
  5. High optimization on size is recommended on release target for lower code size.
  6. Output format: ubrof 8 (forced) for debug and intel-extended for release target.

Device Info

The included source code is written for all devices with with a tunable internal oscillator and a timer with asynchronous operation mode. These devices are listed in the device_specific.h file.
Note that when calibrating the ATCAN90 device using the STK501 top module, a 32kHz crystal other than the one on the STK501 should be used in order to achieve maximum accuracy. Also note that the ATmega169 and ATmega169P has different oscillators, and when calibrating the latter, modify the ATmega169 device specific defines in the device_specific.h file.

ToDo List

Todo:
Change CALIBRATION_FREQUENCY to desired frequency.

Define either CALIBRATION_METHOD_BINARY_WITHOUT_NEIGHBOR or CALIBRATION_METHOD_SIMPLE in the calib_values.h file if a other search methods than the default search method with neighbor search is desired.

If a crystal running at a different frequency than 32kHz is used, modify XTAL_FREQUENCY accordingly. This is not recommended.


Generated on Fri Feb 17 13:50:24 2006 for AVR055 - Using a 32 kHz crystal to calibrate the internal RC oscillatore by  doxygen 1.4.5