We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2020-10-23
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Current sensor
Downloaded: 1864 times
Not followed.
License: MIT license
Current 3 Click is a compact add-on board for applications like current sense and temperature monitoring. This board features the EMC1702, a combination of the high-side current sensing device with a temperature measurement function from Microchip.
Do you want to subscribe in order to receive notifications regarding "Current 3 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Current 3 click" changes.
Do you want to report abuse regarding "Current 3 click".
Library Description
The library covers all the necessary functions to control Current 3 Click board. A library performs the communication with the device via I2C interface.
Key functions:
float current3_get_temperature ( uint8_t temp_sel )
- Get temperature function.float current3_get_source_voltage ( void )
- Get source voltage function.float current3_get_current ( void )
- Get current measurement function.Examples description
The application is composed of three sections :
void application_task ( )
{
temperature = current3_get_temperature( CURRENT3_TEMP_INTERNAL_DIODE );
FloatToStr( temperature, log_text );
Ltrim( log_text );
mikrobus_logWrite( " Temperature = ", _LOG_TEXT );
mikrobus_logWrite( log_text, _LOG_TEXT );
mikrobus_logWrite( " C", _LOG_LINE );
voltage = current3_get_source_voltage( );
FloatToStr( voltage, log_text );
Ltrim( log_text );
mikrobus_logWrite( " Voltage = ", _LOG_TEXT );
mikrobus_logWrite( log_text, _LOG_TEXT );
mikrobus_logWrite( " V", _LOG_LINE );
current = current3_get_current( );
FloatToStr( current, log_text );
mikrobus_logWrite( " Current = ", _LOG_TEXT );
mikrobus_logWrite( log_text, _LOG_TEXT );
mikrobus_logWrite( " mA", _LOG_LINE );
mikrobus_logWrite( "---------------------------", _LOG_LINE );
Delay_ms( 2000 );
}
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.