pac1944 2.0.0.0
|
PAC1944 Click example. More...
Functions | |
void | application_init (void) |
void | application_task (void) |
int | main (void) |
PAC1944 Click example.
This demo application shows an example of measuring voltage, current and power in a selected part of the circuit. Note that PAC1944 is a high side power monitor, therefore the desired channel should be connected accordingly.
The demo application is composed of two sections :
Initialization of I2C module, log UART and additional pins. In addition, a default configuration is performed as followed: Sample mode is 1024, adaptive accumulation; INT pin is set as an alert; SLW pin is set as slow sampling rate control; All channels are on; Channel 1 is set for bipolar measurements; Channel 2 is set for bipolar measurements reduced by half; Channel 3 and 4 are set for unipolar measurements.
The application sends a refresh command which stores the measurement data in registers. Measurements are acquired for voltage, current and power on channel 1 of PAC1944 click board. The last 8 measurements are averaged and calculated in bipolar mode. Process is repeated every two seconds.
void application_init | ( | void | ) |
< Logger config object.
< Click config object.
Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG
void application_task | ( | void | ) |
int main | ( | void | ) |