heat control  r71
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
adc.h
Go to the documentation of this file.
1 #ifndef __ADC_H__
2 #define __ADC_H__
3 
4 #include "types.h"
5 
9 #define ADC_VREF_SEL ((0<<REFS1) | (0<<REFS0) | (0<<ADLAR))
10 
13 #define ADC_INPUTS LAST_ADC_INPUT - FIRST_ADC_INPUT + 1
14 
17 #define ADC_RES 1024
18 
21 #define ADC_MEAN_VALUES 50
22 
25 #define A1 3.354016e-3
26 
29 #define B1 2.519107e-4
30 
33 #define C1 3.510939e-6
34 
37 #define D1 1.105179e-7
38 
39 
40 void AdcInit(void);
41 ISR(ADC_vect);
42 void ProcessNextConversion(void);
43 void StartAdcConversion(void);
44 void SetMux(UCHAR id);
47 
48 
49 #endif
50 
UINT CalcAdcTemp(UCHAR id)
calculate the temperature from specific ADC value in data array, specified by id
Definition: adc.c:107
void StartAdcConversion(void)
start AD conversion, this will trigger the conversion of all selected channels via the interrupt ...
Definition: adc.c:87
#define UCHAR
Definition: types.h:73
UINT CalcSupplyVoltage(UCHAR id)
Definition: adc.c:126
void ProcessNextConversion(void)
checks whether all converted values are processed and starts a new ADC conversion if the latter evalu...
Definition: adc.c:74
void AdcInit(void)
initialize the adc resource
Definition: adc.c:23
void SetMux(UCHAR id)
set multiplexer thus switching between channels
Definition: adc.c:97
ISR(ADC_vect)
ADC interrupt service.
Definition: adc.c:41
#define UINT
Definition: types.h:81