AVR353: Voltage Reference Calibration and Voltage ADC Usage Documentation
This documents the software for application note AVR353, that is routines for calibration of voltage reference and usage of the Voltage ADC in HV parts. No output is implemented, so debugging with JTAGICE mkII has to be used for watching program flow and variables. The source is written for ATmega16HVA.
This software was compiled with IAR Embedded Workbench, 4.21A. In case of an older version see below. To use GCC the source has to be modified.
To make project on IAR EWAVR:
Add the .c files to project (
main.c and
vadc_usage.c). Select device --cpu=m16hva, ATmega16HVA. Enable bit definitions in I/O include files, output format: ubrof8 for Debug and intel_extended for Release.
If an older version of IAR is used, select device * --cpu=v3 and override default linker file with lnkm16HVA.xcl, exchange <iom16hva.h> with "iom16hva.h" for . The Enhanced core must be enabled to read signature data.
The source is written for ATmega16HVA, but may easily be modified to support other HV devices or ATmega406 that have the same/similar bandgap and VADC.
For more info about Atmel AVR visit
http://www.atmel.com/products/AVR/
For application notes visit
http://www.atmel.com/dyn/products/app_notes.asp?family_id=607
Support mail:
avr@atmel.com