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-08-04
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: I2C
Downloaded: 2028 times
Not followed.
License: MIT license
I2C Extend Click is a compact add-on board for applications that require extending the I2C communication bus over a long distance.[MS1] This board features the LTC4331 - an I2C slave device extender over a rugged differential link, from Analog Devices.
Do you want to subscribe in order to receive notifications regarding "I2C Extend click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "I2C Extend click" changes.
Do you want to report abuse regarding "I2C Extend click".
Library Description
The library covers all the necessary functions to control I2C Extend Click board. A library performs the communication with the LTC4331 I2C Slave Device Extender Over Rugged Differential Link via I2C interface.
Key functions:
void i2cextend_generic_write ( uint8_t reg, uint8_t tx_data )
- Generic write data function.uint8_t i2cextend_generic_read ( uint8_t reg )
- Generic read data function.uint8_t i2cextend_rmt_read ( uint8_t rmt_slave_addr, uint8_t reg )
- Generic read data in Remote Mode function.Examples description
The application is composed of three sections :
void application_task ( )
{
mikrobus_logWrite( " Accel | Mag ", _LOG_LINE );
mikrobus_logWrite( "------------------------", _LOG_LINE );
i2cextend_6dofimu11_get_axis( C6DOFIMU11_REG_ACCEL_XOUT_L );
mikrobus_logWrite( " X :", _LOG_TEXT );
IntToStr( axis, log_text );
mikrobus_logWrite( log_text, _LOG_TEXT );
mikrobus_logWrite( " | ", _LOG_TEXT );
i2cextend_6dofimu11_get_axis( C6DOFIMU11_REG_MAG_XOUT_L );
mikrobus_logWrite( " X :", _LOG_TEXT );
IntToStr( axis, log_text );
mikrobus_logWrite( log_text, _LOG_LINE );
i2cextend_6dofimu11_get_axis( C6DOFIMU11_REG_ACCEL_YOUT_L );
mikrobus_logWrite( " Y :", _LOG_TEXT );
IntToStr( axis, log_text );
mikrobus_logWrite( log_text, _LOG_TEXT );
mikrobus_logWrite( " | ", _LOG_TEXT );
i2cextend_6dofimu11_get_axis( C6DOFIMU11_REG_MAG_YOUT_L );
mikrobus_logWrite( " Y :", _LOG_TEXT );
IntToStr( axis, log_text );
mikrobus_logWrite( log_text, _LOG_LINE );
i2cextend_6dofimu11_get_axis( C6DOFIMU11_REG_ACCEL_ZOUT_L );
mikrobus_logWrite( " Z :", _LOG_TEXT );
IntToStr( axis, log_text );
mikrobus_logWrite( log_text, _LOG_TEXT );
mikrobus_logWrite( " | ", _LOG_TEXT );
i2cextend_6dofimu11_get_axis( C6DOFIMU11_REG_MAG_ZOUT_L );
mikrobus_logWrite( " Z :", _LOG_TEXT );
IntToStr( axis, log_text );
mikrobus_logWrite( log_text, _LOG_LINE );
mikrobus_logWrite( "------------------------", _LOG_LINE );
Delay_ms( 1000 );
}
Additional Functions :
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.