adc6 2.0.0.0
|
ADC6 Click example. More...
Functions | |
void | application_init (void) |
void | application_task (void) |
int | main (void) |
ADC6 Click example.
This application collects data from the sensor, calculates the voltage to a digital value and then logs it.
The demo application is composed of two sections :
Initializes driver and sets configuration which enables channel 0, puts AIN0 on positive analog input and AIN1 on negative analog input, enables internal reference voltage (approximately 2.65V (AVDD = 3.3V)), and also enables bipolar operation mode and puts device on full power mode. When the ADC is configured for unipolar operation, the output code is natural (straight) binary with a zero differential input voltage resulting in a code of 0x00000000, a midscale voltage resulting in a code of 0x00800000, and a full-scale input voltage resulting in a code of 0x00FFFFFF. When the ADC is configured for bipolar operation, the output code is offset binary with a negative full-scale voltage resulting in a code of 0x00000000, a zero differential input voltage resulting in a code of 0x00800000, and a positive full-scale input voltage resulting in a code of 0x00FFFFFF.
Gets 24-bit converted data in single read mode and logs data on USB UART. Repeats operation every 500 ms.
void application_init | ( | void | ) |
Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG
void application_task | ( | void | ) |
int main | ( | void | ) |