-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathADC_CONFIG.h
More file actions
55 lines (48 loc) · 1.5 KB
/
ADC_CONFIG.h
File metadata and controls
55 lines (48 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/***************************************************************/
/***************************************************************/
/************ Author: A. S. Eldesouky ************/
/************ Layer: MCAL ************/
/************ SWC: ADC ************/
/************ Date: 28-9-2020 ************/
/************ Version: 1.00 ************/
/***************************************************************/
/***************************************************************/
/*File Gard*/
#ifndef ADC_CONFIG_H_
#define ADC_CONFIG_H_
/* Select the voltage reference
* Choose between
* 1. ADC_AREF_REFERENCE
* 2. ADC_AVCC_REFERENCR
* 3. ADC_INTERNAL_VOLTAGE
*/
#define ADC_VOLTAGE_REFERENCE ADC_AVCC_REFERENCR
/* Set Left Adjust Result
* Choose between
* 1. ADC_RESOLUTION_10_BIT
* 2. ADC_RESOLUTION_8_BIT
*/
#define ADC_RESOLUTION ADC_RESOLUTION_8_BIT
/* Set ADC Prescaler
* Choose between
* 1. ADC_DIVISION_FACTOR_2
* 2. ADC_DIVISION_FACTOR_4
* 3. ADC_DIVISION_FACTOR_8
* 4. ADC_DIVISION_FACTOR_16
* 5. ADC_DIVISION_FACTOR_32
* 6. ADC_DIVISION_FACTOR_64
* 7. ADC_DIVISION_FACTOR_128
*/
#define ADC_PRESCALER_SELECTION ADC_DIVISION_FACTOR_128
/*Set Timeout for ADC_uint8StartSingleConversionSynch
* Choose uint32 value
* Make sure you write UL after you number
*/
#define ADC_uint32TIMEOUT 10000UL
/* Set ADC Peripheral Control
* Choose between
* 1. DISABLE
* 2. ENABLE
*/
#define ADC_PERIPHERAL_CONTROL ENABLE
#endif