i2cmux6
2.0.0.0
|
PRVIH_PAR_RECENICA_SA_PRODUCT_PAGE_DA_ISPRATE_CELINU
[click Product page](CLICK_PRODUCT_PAGE_LINK)
We provide a library for the I2C MUX 6 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 from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
This library contains API for I2C MUX 6 Click driver.
i2cmux6_cfg_setup
Config Object Initialization function. i2cmux6_init
Initialization function. i2cmux6_default_cfg
Click Default Configuration function. i2cmux6_set_channel
This function sets the desired channel active and configures its slave address. i2cmux6_generic_write
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface. i2cmux6_generic_read
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface. This example demonstrates the use of I2C MUX 6 click board by reading the device ID of a 6DOF IMU 11 and Compass 3 click boards connected to the channels 1 and 4 respectfully.
The demo application is composed of two sections :
Initializes the driver and logger.
Reads the device ID of the connected click boards.
Channel 1 : 6DOF IMU 11 click [slave address: 0x0E; reg: 0x00; id: 0x2D], Channel 4 : Compass 3 click [slave address: 0x30; reg: 0x2F; id: 0x0C]. All data is being logged on the USB UART where you can check the device ID.
Make sure to provide 3v3 power supply on VCC-I2C pin.
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on 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. UART terminal is available in all MikroElektronika compilers.