Below are the macro configurations in the main.c
file.
#define FREE_RUNNING 1
#define SINGLE_CONVERSION 2
#define WINDOW_COMPARATOR_MODE 3
#define SAMPLE_ACCUMULATOR 4
EXAMPLE_CODE
:
#define EXAMPLE_CODE SAMPLE_ACCUMULATOR
#define MAX_VOL 2.5 //VREF=2.5V
Maximum input reference voltage is configured to 2.5V to calculate the voltage for measured ADC reading.
#define RES_10BIT 0x3FF
ADC resolution has been configured to be 10 bits, with the maximum result value of 0x3FF.
#define ADC_CHANNEL 5
ADC input signal has been connected to channel 5: AIN5 (pin PA5).