i2cisolator2
2.0.0.0
|
I2C Isolator 2 click provides I2C lines and power isolation for slave devices. It carries the ADM3260 dual I2C isolator with an integrated DC-to-DC converter. I2C Isolator 2 click is designed to run on either 3.3V or 5V power supply.
We provide a library for the I2CIsolator2 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 I2CIsolator2 Click driver.
void i2cisolator2_cfg_setup ( i2cisolator2_cfg_t *cfg );
I2CISOLATOR2_RETVAL i2cisolator2_init ( i2cisolator2_t *ctx, i2cisolator2_cfg_t *cfg );
void i2cisolator2_enable_power ( i2cisolator2_t *ctx, uint8_t state );
void i2cisolator2_write_two_byte_reg ( i2cisolator2_t *ctx, uint16_t reg, uint8_t *data_buf, uint8_t len );
void i2cisolator2_read_two_byte_reg ( i2cisolator2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len );
void i2cisolator2_set_slave_address ( i2cisolator2_t *ctx, uint8_t slave_addr );
This example showcases how to initialize, configure and use the I2C Isolator 2 click module. The click provides I2C lines and power isolation for slave devices. In order for this example to work, you need the EEPROM 3 click.
The demo application is composed of two sections :
Initializes the driver and enables the power output.
Writes the desired message to EEPROM 3 click board and reads it back every 2 seconds. All data is being displayed on the USB UART where you can track the program flow.
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 accaunt.
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.