Rev 1994 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1994 | Rev 1995 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #ifndef _ANALOG_H |
1 | #ifndef _ANALOG_H |
2 | #define _ANALOG_H |
2 | #define _ANALOG_H |
3 | /*####################################################################################### |
3 | /*####################################################################################### |
4 | 4 | ||
5 | #######################################################################################*/ |
5 | #######################################################################################*/ |
6 | 6 | ||
7 | #define SM_FILTER 16 |
7 | #define SM_FILTER 16 |
8 | 8 | ||
9 | extern volatile int UBat; |
9 | extern volatile int UBat; |
10 | extern volatile int AdWertNick, AdWertRoll, AdWertGier; |
10 | extern volatile int AdWertNick, AdWertRoll, AdWertGier; |
11 | extern volatile int AdWertAccRoll,AdWertAccNick,AdWertAccHoch; |
11 | extern volatile int AdWertAccRoll,AdWertAccNick,AdWertAccHoch; |
12 | extern volatile int HiResNick, HiResRoll; |
12 | extern volatile int HiResNick, HiResRoll; |
13 | extern volatile int AdWertNickFilter, AdWertRollFilter, AdWertGierFilter; |
13 | extern volatile int AdWertNickFilter, AdWertRollFilter, AdWertGierFilter; |
14 | extern volatile int Aktuell_Nick,Aktuell_Roll,Aktuell_Gier,Aktuell_ax, Aktuell_ay,Aktuell_az; |
14 | extern volatile int Aktuell_Nick,Aktuell_Roll,Aktuell_Gier,Aktuell_ax, Aktuell_ay,Aktuell_az; |
15 | extern volatile long Luftdruck; |
15 | extern volatile long Luftdruck; |
16 | extern volatile long SummenHoehe; |
16 | extern volatile long SummenHoehe; |
17 | extern volatile char messanzahl_Druck; |
17 | extern volatile char messanzahl_Druck; |
18 | extern volatile unsigned int ZaehlMessungen; |
18 | extern volatile unsigned int ZaehlMessungen; |
19 | extern unsigned char DruckOffsetSetting; |
19 | extern unsigned char DruckOffsetSetting; |
20 | extern signed char ExpandBaro; |
20 | extern signed char ExpandBaro; |
21 | extern volatile int VarioMeter; |
21 | extern volatile int VarioMeter; |
22 | extern volatile unsigned int MessLuftdruck; |
22 | extern volatile unsigned int MessLuftdruck; |
23 | extern volatile int StartLuftdruck; |
23 | extern volatile int StartLuftdruck; |
24 | extern volatile char MessanzahlNick; |
24 | extern volatile char MessanzahlNick; |
25 | extern unsigned char AnalogOffsetNick,AnalogOffsetRoll,AnalogOffsetGier; |
25 | extern unsigned char AnalogOffsetNick,AnalogOffsetRoll,AnalogOffsetGier; |
26 | extern volatile unsigned char AdReady; |
26 | extern volatile unsigned char AdReady; |
27 | 27 | ||
28 | unsigned int ReadADC(unsigned char adc_input); |
28 | unsigned int ReadADC(unsigned char adc_input); |
29 | void ADC_Init(void); |
29 | void ADC_Init(void); |
30 | void SucheLuftruckOffset(void); |
30 | void SucheLuftruckOffset(void); |
31 | void SucheGyroOffset(void); |
31 | void SucheGyroOffset(void); |
32 | 32 | ||
33 | #define AD_GIER 0 |
33 | #define AD_GIER 0 |
34 | #define AD_ROLL 1 |
34 | #define AD_ROLL 1 |
35 | #define AD_NICK 2 |
35 | #define AD_NICK 2 |
36 | #define AD_DRUCK 3 |
36 | #define AD_DRUCK 3 |
37 | #define AD_UBAT 4 |
37 | #define AD_UBAT 4 |
38 | #define AD_ACC_Z 5 |
38 | #define AD_ACC_Z 5 |
39 | #define AD_ACC_Y 6 |
39 | #define AD_ACC_Y 6 |
40 | #define AD_ACC_X 7 |
40 | #define AD_ACC_X 7 |
41 | 41 | ||
42 | 42 | ||
43 | #define ANALOG_OFF ADCSRA=0 |
43 | #define ANALOG_OFF ADCSRA=0 |
44 | 44 | ||
45 | #define ANALOG_ON ADCSRA=(1<<ADEN)|(1<<ADSC)|(0<<ADATE)|(1<<ADPS2)|(1<<ADPS1)|(1<<ADPS0)|(1<<ADIE) |
45 | #define ANALOG_ON ADCSRA=(1<<ADEN)|(1<<ADSC)|(0<<ADATE)|(1<<ADPS2)|(1<<ADPS1)|(1<<ADPS0)|(1<<ADIE) |
46 | //Signle trigger Mode, Interrupt on |
46 | //Signle trigger Mode, Interrupt on |
47 | #endif //_ANALOG_H |
47 | #endif //_ANALOG_H |