OFF
MIKROE-4262
21 g
Status:
I2C MUX 3 Click is a compact add-on board that contains eight bidirectional translating switches dedicated for applications with I2C slave address conflicts. This board features the TCA9548APWR, a low voltage 8-channel I2C bus switch with an active-low reset input from Texas Instruments. It possesses three programmable address pins that allow up to eight TCA9548APWR devices, supports hot insertion, has a low Stand-by current, and no glitch during Power-Up with all switch channels deselected. This Click board™ is suitable to work with I2C interfaces for applications such as fault isolation, address conflict, level translation, or broadcast communication (servers, routers...).
I2C MUX 3 Click is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.
This product is no longer in stock
Availability date:
I2C MUX 3 Click is based on the TCA9548APWR, a low voltage eight bidirectional translating switches with an active-low reset input controlled through the I2C serial interface from Texas Instruments. The master SCL/SDA signal pair is directed to eight channels of slave devices, SC0/SD0-SC7/SD7, where any individual downstream channel can be selected as well as any combination of the eight channels. It features I2C control using a single 8-bit control register in which each bit controls the enabling and disabling of one of the corresponding 8 switch channels for I2C data flow.
This Click board™ includes a low dropout linear regulator AP7331 from Diodes Incorporated to provide the 2.45V supply voltage for the TCA9548APWR. When the TCA9548APWR is turned on for the first time or anytime the device needs to be reset by cycling the power supply, which means that the Power-On reset requirements must be followed to ensure the I2C bus logic is initialized properly. Additionally, if communication on the I2C bus enters a fault state, the TCA9548APWR can be reset to resume normal operation using the RST pin feature or by a Power-On reset which results from cycling power to the device.
I2C MUX 3 Click communicates with MCU using the standard I2C 2-Wire interface that supports Standard-Mode (100 kHz) and Fast-Mode (400 kHz) operation. The TCA9548APWR has a 7-bit slave address with the first five MSBs fixed to 1110. The address pins A0, A1 and A2 are programmed by the user and determines the value of the last three LSBs of the slave address which can be selected by onboard SMD jumpers labeled as ADDR SEL allowing selection of the slave address LSBs. It also has an active-low reset signal routed on the RST pin of the mikroBUS™ socket used to recover from a bus-fault condition. When this signal is asserted low the TCA9548APWR resets its registers alongside with I2C state machine and deselects all channels.
This Click board™ is designed to be operated with both 3.3V and 5V logic voltage levels that can be selected via VCC SEL jumper. This allows for both 3.3V and 5V capable MCUs to use the I2C communication lines properly. More information about the TCA9548APWR can be found in the attached datasheet. However, the Click board™ comes equipped with a library that contains easy to use functions and a usage example that may be used as a reference for further development.
Type
I2C
Applications
Can be used with I2C interfaces for applications such as fault isolation, address conflict, level translation, or broadcast communication (servers, routers...).
On-board modules
I2C MUX 3 Click is based on the TCA9548APWR, a low voltage eight bidirectional translating switches with an active-low reset input controlled through the I2C serial interface from Texas Instruments.
Key Features
1-to-8 bidirectional translating switches, low Stand-By current, support hot insertion, deselected channels during Power-Up, and more.
Interface
I2C
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V or 5V
This table shows how the pinout on I2C MUX 3 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED Indicator |
JP1 | VCC SEL | Left | Power Supply Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
JP2-JP4 | ADDR SEL | Left | Communication interface selection: Left position 0, Right position 1 |
J1-J8 | - | - | Output I2C Channel Pins |
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | -0.5 | - | 7 | V |
Maximum Output Current | -25 | - | - | mA |
Maximum Frequency | - | - | 400 | kHz |
Operating Temperature Range | -40 | - | +125 | °C |
We provide a library for the I2C MUX 3 Click on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library covers all the necessary functions that enables the usage of the I2C MUX 3 click board. User can set one of 8 channels by writing to devices control register and check it by reading, or use the function to set it directly. User can also use sequential read and write function to comunicate with the devices sonnected to the selected channel.
Key functions:
uint8_t n_bytes );
- Function is used to write a sequential data starting from the targeted 8-bit register address of the device connected to the desired channel of the I2C MUX 4 click board.uint8_t n_bytes )
- Function is used to read a sequential data starting from the targeted 8-bit register address of the device connected to the desired channel of the I2C MUX 4 click board.void i2cmux3_ch_sel ( uint8_t sel_ch );
- Function is used to select communication channel.Examples description
The application is composed of three sections :
void application_task ( ) { mikrobus_logWrite( "-------------------------", _LOG_LINE ); mikrobus_logWrite( "ID values by click board:", _LOG_LINE ); mikrobus_logWrite( "-------------------------", _LOG_LINE ); mikrobus_logWrite( "", _LOG_LINE ); i2cmux3_ch_sel( 0 ); i2cmux3_rd_slv ( 0x68, 0x00, &id_val, 1 ); ByteToHex( id_val, log_txt ); Ltrim( log_txt ); mikrobus_logWrite( " 6DOF IMU 12 : 0x", _LOG_TEXT ); mikrobus_logWrite( log_txt, _LOG_LINE ); mikrobus_logWrite( "-------------------------", _LOG_LINE ); Delay_ms( 100 ); i2cmux3_ch_sel( 1 ); i2cmux3_rd_slv ( 0x68, 0x0F, &id_val, 1 ); ByteToHex( id_val, log_txt ); Ltrim( log_txt ); mikrobus_logWrite( " RTC 10 : 0x", _LOG_TEXT ); mikrobus_logWrite( log_txt, _LOG_LINE ); mikrobus_logWrite( "-------------------------", _LOG_LINE ); Delay_ms( 100 ); i2cmux3_ch_sel( 2 ); i2cmux3_rd_slv ( 0x48, 0x0B, &id_val, 1 ); ByteToHex( id_val, log_txt ); Ltrim( log_txt ); mikrobus_logWrite( " Surface Temp : 0x", _LOG_TEXT ); mikrobus_logWrite( log_txt, _LOG_LINE ); mikrobus_logWrite( "-------------------------", _LOG_LINE ); Delay_ms( 100 ); i2cmux3_ch_sel( 3 ); i2cmux3_rd_slv ( 0x39, 0x92, &id_val, 1 ); ByteToHex( id_val, log_txt ); Ltrim( log_txt ); mikrobus_logWrite( " Spectrometer : 0x", _LOG_TEXT ); mikrobus_logWrite( log_txt, _LOG_LINE ); mikrobus_logWrite( "-------------------------", _LOG_LINE ); Delay_ms( 100 ); i2cmux3_ch_sel( 4 ); i2cmux3_rd_slv ( 0x30, 0x2F, &id_val, 1 ); ByteToHex( id_val, log_txt ); Ltrim( log_txt ); mikrobus_logWrite( " Compass 3 : 0x", _LOG_TEXT ); mikrobus_logWrite( log_txt, _LOG_LINE ); mikrobus_logWrite( "-------------------------", _LOG_LINE ); Delay_ms( 100 ); i2cmux3_ch_sel( 5 ); i2cmux3_rd_slv ( 0x29, 0x12, &id_val, 1 ); ByteToHex( id_val, log_txt ); Ltrim( log_txt ); mikrobus_logWrite( " Color 3 : 0x", _LOG_TEXT ); mikrobus_logWrite( log_txt, _LOG_LINE ); mikrobus_logWrite( "-------------------------", _LOG_LINE ); Delay_ms( 100 ); i2cmux3_ch_sel( 6 ); i2cmux3_rd_slv ( 0x0E, 0x00, &id_val, 1 ); ByteToHex( id_val, log_txt ); Ltrim( log_txt ); mikrobus_logWrite( " 6DOF IMU 11 : 0x", _LOG_TEXT ); mikrobus_logWrite( log_txt, _LOG_LINE ); mikrobus_logWrite( "-------------------------", _LOG_LINE ); Delay_ms( 100 ); i2cmux3_ch_sel( 7 ); i2cmux3_rd_slv ( 0x57, 0xFF, &id_val, 1 ); ByteToHex( id_val, log_txt ); Ltrim( log_txt ); mikrobus_logWrite( " Heart Rate 4 : 0x", _LOG_TEXT ); mikrobus_logWrite( log_txt, _LOG_LINE ); mikrobus_logWrite( "-------------------------", _LOG_LINE ); Delay_ms( 100 ); mikrobus_logWrite( "", _LOG_LINE ); mikrobus_logWrite( "-------------------------", _LOG_LINE ); Delay_ms( 3000 ); }
The full application code, and ready to use projects can be found on our LibStock page.
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.
This Click board™ is supported with mikroSDK - MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.
NOTE: Please be advised that any peripheral devices or accessories shown connected to the Click board™ are not included in the package. Check their availability in our shop or in the YMAN section below.