smartbuck 2.0.0.0
|
Smart Buck click is the two-channel step-down DC/DC converter and regulator, with plenty of additional functions. It can provide voltage measurement at each of its two programmable voltage outputs, as well as the measurement of the current consumption.
We provide a library for the Smart Buck 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 form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
This library contains API for Smart Buck Click driver.
- Initialization function.void smartbuck_cfg_setup ( smartbuck_cfg_t *cfg );
SMARTBUCK_RETVAL smartbuck_init ( smartbuck_t *ctx, smartbuck_cfg_t *cfg );
void smartbuck_default_cfg ( smartbuck_t *ctx );
- Function reads and calculates the voltage, current and power data from PAC1934 activated channels.uint8_t smartbuck_send_cmd_PAC ( smartbuck_t *ctx, uint8_t command );
void smartbuck_get_data( smartbuck_t *ctx, float *voltage, float *current, float *power );
uint8_t smartbuck_block_read_PAC( smartbuck_t *ctx, uint8_t reg_addr, uint8_t *data_out, uint8_t n_bytes );
This application reads voltage, current, and power from all available channels.
The demo application is composed of two sections :
Initializes I2C interface and logger and peforms the click default configuration.
Sends command for updating data registers with new converted data, then waits 500ms and after that reads new data from data registers. In this way we can get voltage, current and power data from activated channels. Results are being logged on USB UART.
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or 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. The terminal available in all Mikroelektronika compilers, or any other terminal application of your choice, can be used to read the message.