stk_525.c File Reference

,vThis file contains the low level functions for the ADC More...

#include "config.h"
#include "stk_525.h"
#include "lib_mcu\adc\adc_drv.h"

Include dependency graph for stk_525.c:

Go to the source code of this file.

Functions

U16 Get_adc_mic_val (void)
 Get_adc_mic_val.
U16 Get_adc_pot_val (void)
 Get_adc_pot_val.
U16 Get_adc_temp_val (void)
 This function performs an ADC conversion from the USB KEY TEMP channel an returns the 10 bits result in an U16 value.
S16 Read_temperature (void)
 This function performs an ADC conversion from the USB KEY TEMP channel an returns the 10 bits result of the temperature (in °C) in an S16 value.

Variables

code U16 temperature_code []
 The following table give the correspondance between the ADC code and the temperature Each elements of the table corresponds to an ADC code value.


Detailed Description

,vThis file contains the low level functions for the ADC

Copyright (c) 2004 Atmel.

Please read file license.txt for copyright notice.

Version:
1.3 at90usb128-demo-hidgen-1_0_0
Id
stk_525.c,v 1.3 2006/03/14 15:36:00 rletendu Exp
Todo:
Bug:

Definition in file stk_525.c.


Variable Documentation

code U16 temperature_code[]
 

Initial value:

{  0x3B4,0x3B0,0x3AB,0x3A6,0x3A0,0x39A,0x394,0x38E,0x388,0x381,0x37A,0x373,
   0x36B,0x363,0x35B,0x353,0x34A,0x341,0x338,0x32F,0x325,0x31B,0x311,0x307,
   0x2FC,0x2F1,0x2E6,0x2DB,0x2D0,0x2C4,0x2B8,0x2AC,0x2A0,0x294,0x288,0x27C,
   0x26F,0x263,0x256,0x24A,0x23D,0x231,0x225,0x218,0x20C,0x200,0x1F3,0x1E7,
   0x1DB,0x1CF,0x1C4,0x1B8,0x1AC,0x1A1,0x196,0x18B,0x180,0x176,0x16B,0x161,
   0x157,0x14D,0x144,0x13A,0x131,0x128,0x11F,0x117,0x10F,0x106,0xFE,0xF7,
   0xEF,0xE8,0xE1,0xDA,0xD3,0xCD,0xC7,0xC0,0xBA,0xB5,0xAF,0xAA,0xA4,0x9F,
   0x9A,0x96,0x91,0x8C,0x88,0x84,0x80,0x7C,0x78,0x74,0x71,0x6D,0x6A,0x67,
   0x64,0x61,0x5E,0x5B,0x58,0x55,0x53,0x50,0x4E,0x4C,0x49,0x47,0x45,0x43,
   0x41,0x3F,0x3D,0x3C,0x3A,0x38}
The following table give the correspondance between the ADC code and the temperature Each elements of the table corresponds to an ADC code value.

The index in the table give the corresponding temperature (in°C) with the following formula : Tempeature=index-20. table[O] corresponds to -20°C temperature code The following table gives the ADC code for VCC=3.3V and Aref=AVcc

Definition at line 36 of file stk_525.c.

Referenced by Read_temperature().


Generated on Fri Mar 17 16:02:07 2006 for Atmel by  doxygen 1.4.6-NO