How does it work?
I2C MUX 7 Click as its foundation uses the PI4MSD5V9547, a low voltage octal bidirectional translating multiplexer 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 CH0-CH7, where only one SCL/SDA channel can be selected at a time, determined by the contents of the programmable control register. The board powers up with Channel 0 connected, allowing immediate communication between the Master and downstream devices on that channel.
This Click board™ includes a low dropout linear regulator AP2112 from Diodes Incorporated to provide the 1.8V supply voltage for the PI4MSD5V9547. When power is applied to IC, an internal Power-On Reset (POR) holds the PI4MSD5V9547 in a reset condition until the power supply reaches the POR voltage level. At this point, the reset condition is released, and the PI4MSD5V9547 registers and I2C-bus state machine are initialized to their default states (all zeroes), causing deselection of all channels.
I2C MUX 7 Click communicates with MCU using the standard I2C 2-Wire interface that supports Standard-Mode (100 kHz) and Fast-Mode (400 kHz) operation. The PI4MSD5V9547 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 determine 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. Alongside the internal Power-On Reset (POR) function, this board 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 PI4MSD5V9547 resets its registers alongside with I2C state machine and deselects all channels.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the VCC SEL jumper. This way, it is allowed for both 3.3V and 5V capable MCUs to use the communication lines properly. However, the Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used, as a reference, for further development.
Specifications
Type
I2C
Applications
Can be used for a wide range of applications from industrial to medical, communications, and automotive systems
On-board modules
PI4MSD5V9547 – octal bidirectional translating multiplexer controlled by the I2C-bus from Texas Instruments
Key Features
Low power consumption, reset feature, channel selection via I2C bus, Power-Up with one channel ON, no glich on Power-On, support hot insertion, 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
Pinout diagram
This table shows how the pinout on I2C MUX 7 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
JP1 | VCC SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
JP2-JP4 | ADDR SEL | Left | I2C Address Selection 0/1: Left position 0, Right position 1 |
J1-J8 | CH0-CH7 | Populated | Output I2C Channel Pins |
I2C MUX 7 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
ON Resistance | – | – | 70 | Ω |
Operating Temperature Range | -40 | +25 | +85 | °C |
Software Support
We provide a library for the I2C MUX 7 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.
Library Description
This library contains API for I2C MUX 7 Click driver.
Key functions
-
i2cmux7_set_channel
This function sets the desired channel active and configures its slave address. -
i2cmux7_read_channel
This function reads the currently selected channel value. -
i2cmux7_generic_read
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
Example Description
This example demonstrates the use of I2C MUX 7 Click board™ by reading the device ID of a 6DOF IMU 11 and Compass 3 click boards connected to the channels 0 and 7 respectfully.
void application_task ( void )
{
uint8_t channel, device_id;
if ( I2CMUX7_OK == i2cmux7_set_channel ( &i2cmux7, DEVICE0_POSITION, DEVICE0_SLAVE_ADDRESS ) )
{
if ( I2CMUX7_OK == i2cmux7_read_channel ( &i2cmux7, &channel ) )
{
log_printf( &logger, " --- Channel %u --- rn", ( uint16_t ) ( channel & I2CMUX7_CHANNEL_NUM_MASK ) );
}
if ( I2CMUX7_OK == i2cmux7_generic_read ( &i2cmux7, DEVICE0_REG_ID, &device_id, 1 ) )
{
log_printf( &logger, " %s - Device ID: 0x%.2X rnn", ( char * ) DEVICE0_NAME, ( uint16_t ) device_id );
}
Delay_ms( 1000 );
}
if ( I2CMUX7_OK == i2cmux7_set_channel ( &i2cmux7, DEVICE1_POSITION, DEVICE1_SLAVE_ADDRESS ) )
{
if ( I2CMUX7_OK == i2cmux7_read_channel ( &i2cmux7, &channel ) )
{
log_printf( &logger, " --- Channel %u --- rn", ( uint16_t ) ( channel & I2CMUX7_CHANNEL_NUM_MASK ) );
}
if ( I2CMUX7_OK == i2cmux7_generic_read ( &i2cmux7, DEVICE1_REG_ID, &device_id, 1 ) )
{
log_printf( &logger, " %s - Device ID: 0x%.2X rnn", ( char * ) DEVICE1_NAME, ( uint16_t ) device_id );
}
Delay_ms( 1000 );
}
}
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:
- MikroSDK.Board
- MikroSDK.Log
- Click.I2CMUX7
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.
mikroSDK
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.