TOP Contributors

  1. MIKROE (2663 codes)
  2. Alcides Ramos (358 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (137097 times)
  2. FAT32 Library (70236 times)
  3. Network Ethernet Library (56124 times)
  4. USB Device Library (46434 times)
  5. Network WiFi Library (42073 times)
  6. FT800 Library (41387 times)
  7. GSM click (29116 times)
  8. mikroSDK (26562 times)
  9. PID Library (26489 times)
  10. microSD click (25487 times)
Libstock prefers package manager

Package Manager

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]

< Back
mikroSDK Library

I2C MUX 4 click

Rating:

5

Author: MIKROE

Last Updated: 2020-09-10

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: I2C

Downloaded: 1354 times

Not followed.

License: MIT license  

I2C MUX 4 Click is a compact add-on board that contains a dual bidirectional translating switch dedicated for applications with I2C slave address conflicts. This board features the TCA9543APWR, a low voltage 2-channel I2C bus switch with interrupt logic from Texas Instruments.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "I2C MUX 4 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "I2C MUX 4 click" changes.

Do you want to report abuse regarding "I2C MUX 4 click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

I2C MUX 4 Click

I2C MUX 4 Click

Native view of the I2C MUX 4 Click board.

View full image
I2C MUX 4 Click

I2C MUX 4 Click

Front and back view of the I2C MUX 4 Click board.

View full image

Library Description

The library covers all the necessary functions to control I2C MUX 4 Click board. A library performs the communication with the TCA9543A Low Voltage 2-Channel I2C Bus Switch via I2C interface.

Key functions:

  • void i2cmux4_power_on ( uint8_t enable ) - Power On function.
  • void i2cmux4_set_channel ( uint8_t sel_ch, uint8_t ch_slave_addr ) - Set channel function.
  • uint8_t i2cmux4_check_int ( void ) - Check interrupt function.

Examples description

The application is composed of three sections :

  • System Initialization - Initializes I2C, set RST pin as output, INT pin as input and start to write log.
  • Application Initialization - Initialization driver enables - I2C, executes call power On and hardware reset, also write log.
  • Application Task - (code snippet) This is an example that demonstrates the use of the I2C MUX 4 Click board. In this example, we read "Who am I" ( or "State" ) register of the connected click boards to the I2C MUX 4 click. Channel 0 : 6DOF IMU 12 click [slave address: 0x0E; reg: 0x00; id val.: 0x24], Channel 1 : RTC 10 click [slave address: 0x68; reg: 0x0F; st val.: 0x88]. All data logs write on USB UART changes approximately every 2 sec.
void application_task ( )
{
    // CH 0 - 6DOF IMU 12 click
    i2cmux4_set_channel( I2CMUX4_SEL_CH_0, 0x68 );
    Delay_ms( 100 );

    i2cmux4_rmt_read_bytes( 0x00, &rx_data, 1 );
    Delay_ms( 100 );

    ByteToHex( rx_data, log_text );
    mikrobus_logWrite( "    6DOF IMU 12 click  ", _LOG_LINE );
    mikrobus_logWrite( "- - - - - - - - - - - -", _LOG_LINE );
    mikrobus_logWrite( "       ID = 0x", _LOG_TEXT );
    mikrobus_logWrite( log_text, _LOG_LINE );
    mikrobus_logWrite( "-----------------------", _LOG_LINE );
    Delay_ms( 1000 );
    
    
    // CH 1 - RTC 10 click
    i2cmux4_set_channel( I2CMUX4_SEL_CH_1, 0x68 );
    Delay_ms( 100 );

    i2cmux4_rmt_read_bytes( 0x0F, &rx_data, 1 );
    Delay_ms( 100 );

    ByteToHex( rx_data, log_text );
    mikrobus_logWrite( "      RTC 10 click     ", _LOG_LINE );
    mikrobus_logWrite( "- - - - - - - - - - - -", _LOG_LINE );
    mikrobus_logWrite( "       ID = 0x", _LOG_TEXT );
    mikrobus_logWrite( log_text, _LOG_LINE );
    mikrobus_logWrite( "-----------------------", _LOG_LINE );
    Delay_ms( 1000 );
}

Other mikroE Libraries used in the example:

  • I2C
  • UART
  • Conversions

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB 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.

ALSO FROM THIS AUTHOR

Terminal 2 click

0

Terminal 2 Click is an adapter Click board™ used as a mikroBUS™ socket expansion board. It provides an easy and elegant solution for adding the external connection capability to the Click board™, plugged on a mikroBUS™ socket. Featuring two 9-position 2.54mm pitch terminal blocks makes it an easy way to expand the development system's connectivity with the mikroBUS™ socket while keeping the bus free to use with any Click board™.

[Learn More]

DAQ 3 click

0

DAQ 3 Click is a compact add-on board representing a precision data acquisition solution. This board features the ADAQ4003, fast and precise μModule precision data acquisition (DAQ) signal chain solution from Analog Devices. Using SIP technology, the ADAQ4003 reduces end system component count by combining multiple standard signal processing and conditioning blocks into a single device. These blocks include a high-resolution 18-bit, 2 MSPS successive approximation register ADC, fully differential ADC driver amplifier, and a stable reference buffer along with selectable gain options. This Click board™ is suitable for process control and machine automation applications, as automatic test equipment, digital control loops, and more.

[Learn More]

RN4871 click

0

RN4871 click carries the RN4871 Bluetooth® 4.2 low energy module from Microchip.The click is designed to run on a 3.3V power supply. It uses ASCII Command Interface over UART for communication with target microcontroller, with additional functionality provided by the following pins on the mikroBUS™ line: RST, CS, and INT.

[Learn More]