pac1954 2.0.0.0
|
PAC1954 Click is a compact add-on board that contains an energy monitoring solution. This board features the PAC1954, a four-channel DC power/energy monitor from Microchip Technology. It uses real-time calibration to minimize offset and gain errors with no input filters required for this device.
We provide a library for the PAC1954 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
This library contains API for PAC1954 Click driver.
pac1954_cfg_setup
Config Object Initialization function. pac1954_init
Initialization function. pac1954_default_cfg
Click Default Configuration function. pac1954_refresh_cmd
This function updates the readable registers for the VBUS, VSENSE, Power, accumulator outputs and accumulator count by issuing the REFRESH command. The values will be static until the next REFRESH command. pac1954_get_calc_measurement
This function calls the function for getting the selected measurement data and performs all the necessary calculations to get the measurement value in standard unit. pac1954_generic_write
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface. This example demonstrates the use of PAC1954 click board.
The demo application is composed of two sections :
Initializes the driver and performs the click default configuration.
Reads the voltage, current, and power from Channel 1 and displays all values on the USB UART once per second.
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 Click or RS232 Click to connect to your PC, for development systems with no UART to USB interface available on the board. UART terminal is available in all MikroElektronika compilers.