calib_values.h File Reference


Detailed Description

Configuration and macros.

Application note:
AVR055: Using a 32 kHz crystal to calibrate the internal RC oscillator
Documentation
For comprehensive code documentation, supported compilers, compiler settings and supported devices see readme.html
Author:
Atmel Corporation: http://www.atmel.com
Support email: avr@atmel.com
Name
RELEASE_1_1
Revision
1.2
RCSfile
calib_values.h,v
Date
2006/02/17 12:49:26

Definition in file calib_values.h.

#include "device_specific.h"

Include dependency graph for calib_values.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define ABS(var)   (((var) < 0) ? -(var) : (var));
#define CALIBRATION_FREQUENCY   1000000
 User defined values.
#define COMPUTE_COUNT_VALUE()   countVal = ((EXTERNAL_TICKS*CALIBRATION_FREQUENCY)/(XTAL_FREQUENCY*LOOP_CYCLES));
#define DEFAULT_OSCCAL   ((1 << (OSCCAL_RESOLUTION - 1)) | DEFAULT_OSCCAL_MASK)
#define DEFAULT_OSCCAL_HIGH   ((1 << (OSCCAL_RESOLUTION - 1)) | DEFAULT_OSCCAL_MASK_HIGH)
#define DEFAULT_OSCCAL_MASK   0x00
#define DEFAULT_OSCCAL_MASK_HIGH   0x80
#define EXTERNAL_TICKS   100
#define FALSE   0
 Fixed calibration values and macros.
#define FINISHED   1
#define INITIAL_STEP   (1 << (OSCCAL_RESOLUTION - 2))
#define NOP()   __no_operation()
#define PREPARE_CALIBRATION()
#define RUNNING   0
#define SETUP_ASYNC_TIMER()
#define TRUE   1
#define XTAL_FREQUENCY   32768


Define Documentation

#define ABS var   )     (((var) < 0) ? -(var) : (var));
 

Definition at line 109 of file calib_values.h.

Referenced by CalibrateInternalRc().

#define CALIBRATION_FREQUENCY   1000000
 

User defined values.

Modify CALIBRATION_FREQUENCY to desired calibration frequency

Definition at line 44 of file calib_values.h.

 
#define COMPUTE_COUNT_VALUE  )     countVal = ((EXTERNAL_TICKS*CALIBRATION_FREQUENCY)/(XTAL_FREQUENCY*LOOP_CYCLES));
 

Definition at line 74 of file calib_values.h.

Referenced by CalibrationInit().

#define DEFAULT_OSCCAL   ((1 << (OSCCAL_RESOLUTION - 1)) | DEFAULT_OSCCAL_MASK)
 

Definition at line 67 of file calib_values.h.

Referenced by CalibrationInit().

#define DEFAULT_OSCCAL_HIGH   ((1 << (OSCCAL_RESOLUTION - 1)) | DEFAULT_OSCCAL_MASK_HIGH)
 

Definition at line 65 of file calib_values.h.

Referenced by main().

#define DEFAULT_OSCCAL_MASK   0x00
 

Definition at line 60 of file calib_values.h.

#define DEFAULT_OSCCAL_MASK_HIGH   0x80
 

Definition at line 61 of file calib_values.h.

#define EXTERNAL_TICKS   100
 

Definition at line 49 of file calib_values.h.

Referenced by Counter().

#define FALSE   0
 

Fixed calibration values and macros.

These values are fixed and used by all calibration methods. Not to be modified.

Definition at line 56 of file calib_values.h.

#define FINISHED   1
 

Definition at line 59 of file calib_values.h.

Referenced by BinarySearch(), CalibrateInternalRc(), and NeighborSearch().

#define INITIAL_STEP   (1 << (OSCCAL_RESOLUTION - 2))
 

Definition at line 66 of file calib_values.h.

 
#define NOP  )     __no_operation()
 

Definition at line 105 of file calib_values.h.

Referenced by BinarySearch(), CalibrateInternalRc(), CalibrationInit(), main(), and NeighborSearch().

 
#define PREPARE_CALIBRATION  ) 
 

Value:

Definition at line 70 of file calib_values.h.

Referenced by main().

#define RUNNING   0
 

Definition at line 58 of file calib_values.h.

Referenced by CalibrateInternalRc().

 
#define SETUP_ASYNC_TIMER  ) 
 

Value:

ASSR |= (1<<ASYNC_TIMER); \
ASYNC_TIMER_CONTROL_REGISTER = (1<<NO_PRESCALING);

Definition at line 78 of file calib_values.h.

Referenced by CalibrationInit().

#define TRUE   1
 

Definition at line 57 of file calib_values.h.

#define XTAL_FREQUENCY   32768
 

Frequency of the external oscillator. A 32kHz crystal is recommended

Definition at line 48 of file calib_values.h.


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