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: 2021-01-22
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: I2C
Downloaded: 2753 times
Not followed.
License: MIT license
I2C Isolator 3 Click is a compact add-on board that offers completely isolated bidirectional communication. This board features the CPC5902, a dual optically isolated bidirectional logic-bus repeater from IXYS Integrated Circuits Division.
Do you want to subscribe in order to receive notifications regarding "I2C Isolator 3 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "I2C Isolator 3 click" changes.
Do you want to report abuse regarding "I2C Isolator 3 click".
Library Description
The library covers all the necessary functions to control I2C Isolator 3 Click board™. Library performs a standard I2C interface communication.
Key functions:
void i2cisolator3_set_slave_address ( uint8_t slave_addr )
- Set slave address function.void i2cisolator3_send_cmd ( uint8_t command )
- Send command function.void i2cisolator3_burst_read ( uint8_t reg, uint8_t *p_rx_data, uint8_t n_bytes )
- Burst read function.Examples description
The application is composed of three sections :
void application_task ( )
{
i2cisolator3_send_cmd( I2CISOLATOR3_THERMO20_CMD_CONVERSION );
Delay_ms( 100 );
calculate_temperature( );
FloatToStr( temperature, log_text );
mikrobus_logWrite( " Temperature : ", _LOG_TEXT );
mikrobus_logWrite( log_text, _LOG_TEXT );
mikrobus_logWrite( " C", _LOG_LINE );
mikrobus_logWrite( "--------------------------", _LOG_LINE );
Delay_ms( 3000 );
}
Additional Functions :
void calculate_temperature( )
- Calculate temperature in degrees Celsius.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.