I2C MUX 6 Click-Platine
I2C MUX 6 Click-Platine
Key Features
- Niedriger Stromverbrauch, schnelle I2C-Schnittstelle, 5-V-tolerante I2C- und Enable-Pins zur Unterstützung des Mixed-Mode-Signalbetriebs, ausgeschaltete hochohmige I2C-Pins, Erweiterungsbus und mehr
- Basierend auf dem PCA9518 – vierkanaliger bidirektionaler Puffer, steuerbar über die serielle I2C-Schnittstelle von Texas Instruments
- Kann für verschiedene Anwendungen von der Industrie über die Medizintechnik bis hin zu Kommunikations- und Automobilsystemen verwendet werden
- mikroBUS: I2C-Schnittstelle
Das I2C MUX 6 Click Board™ ist eine kompakte Zusatzplatine, die einen bidirektionalen Selektor für Anwendungen mit I2C-Slave-Adresskonflikten darstellt. Diese Platine verfügt über den PCA9518, einen erweiterbaren bidirektionalen Fünfkanalpuffer, der vom I2C-Bus von Texas Instruments gesteuert wird. Der PCA9518 überwindet die Einschränkung der maximalen Buskapazität, indem er die I2C-Daten- (SDA) und Taktleitungen (SCL) in mehrere Gruppen von 400-pF-I2C-Kanälen trennt und puffert. Er aktiviert den gewünschten Kanal über einen bestimmten Enable-Pin und ermöglicht die Erweiterung des I2C-Busses über einen integrierten Erweiterungs-Header, indem er sowohl die Daten- (SDA) als auch die Taktleitungen (SCL) puffert und so praktisch eine unbegrenzte Anzahl von Bussen mit 400 pF ermöglicht. Dieses Click Board™ ist für verschiedene Anwendungen in den Bereichen Industrie, Medizin, Kommunikation und Automobil geeignet.
Das I2C MUX 6 Click Board™ wird von einer mikroSDK-kompatiblen Bibliothek unterstützt, die Funktionen enthält, die die Softwareentwicklung vereinfachen. Dieses Click Board™ wird als vollständig getestetes Produkt geliefert und ist bereit für den Einsatz auf einem System, das mit der mikroBUS™-Buchse ausgestattet ist.
How Does The I2C MUX 6 Click Board™Work?
The I2C MUX 6 Click Board™ as its foundation uses the PCA9518, an expandable four-channel bidirectional buffer controllable through the I2C serial interface from Texas Instruments. The primary SCL/SDA signal pair is directed to four channels where only one SCL/SDA channel can be selected at a time, determined on the state of the four Enable pins, routed to the AN, RST, CS, and PWM pins of the mikroBUS™ socket. The PCA9518 overcomes the restriction of maximum bus capacitance by separating and buffering the I2C data (SDA) and clock (SCL) lines into multiple groups of 400pF I2C channels.
The PCA9518 has several multi-directional open-drain buffers designed to support the standard low-level-contention arbitration of the I2C bus. Except during arbitration, the PCA9518 acts like a pair of non-inverting open-drain buffers, one for SDA and one for SCL. It can communicate with other PCA9518 hubs through a 4-wire inter-hub expansion bus, located on the onboard header with EXP labelled pins, i.e., permits extension of the I2C-bus by buffering both the data (SDA) and the clock (SCL) lines enabling virtually an unlimited number of buses of 400pF.
The PCA9518 communicates with MCU using the standard I2C interface that supports Standard-Mode (100 kHz) and Fast-Mode (400 kHz) operation. As mentioned before, each Enable pin, ENx, controls its associated SDAx and SCLx channels. When the ENx pin is in a low logic state, it isolates its corresponding SDAx and SCLx lines from the system by blocking the inputs from SDAx and SCLx and disabling the output drivers on these lines. It is essential that the ENx change state only when both the global bus and the local port are in an IDLE state to prevent system failures.
The I2C MUX 6 Click Board™is designed for 3.3V operation. It also has onboard terminals labelled as VCC-I2C to supply a voltage, 3.3V or 5V, for PCA9518's I2C lines, which are 5V-tolerant. However, the board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. The Click board™ comes equipped with a library containing functions and an example code that can be used, as a reference, for further development.
SPECIFICATIONS
Type | I2C |
Applications | Can be used for various applications from industrial to medical, communications, and automotive systems |
On-board modules | PCA9518 - four-channel bidirectional buffer controllable through the I2C serial interface from Texas Instruments |
Key Features | Low power consumption, fast I2C interface, 5V tolerant I2C and enable pins to support mixed-mode signal operation, powered-off high-impedance I2C pins, expansion bus, and more |
Interface | I2C |
Compatibility | mikroBUS |
Click board size | M (42.9 x 25.4 mm) |
Input Voltage | 3.3V |
PINOUT DIAGRAM
This table shows how the pinout of the I2C MUX 6 Click Board™ corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes | Pin | Pin | Notes | ||||
---|---|---|---|---|---|---|---|
Channel 1 Enable | EN1 | 1 | AN | PWM | 16 | EN4 | Channel 4 Enable |
Channel 2 Enable | EN2 | 2 | RST | INT | 15 | NC | |
Channel 3 Enable | EN3 | 3 | CS | RX | 14 | NC | |
NC | 4 | SCK | TX | 13 | NC | ||
NC | 5 | MISO | SCL | 12 | SCL | I2C Clock | |
NC | 6 | MOSI | SDA | 11 | SDA | I2C Data | |
Power Supply | 3.3V | 7 | 3.3V | 5V | 10 | NC | |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
ONBOARD SETTINGS AND INDICATORS
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED Indicator |
J1 | - | Populated | I2C Expansion Header |
I2C MUX 6 CLICK ELECTRICAL SPECIFICATIONS
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | - | 3.3 | - | V |
I2C Bus Voltage Range VCC-I2C | 3.3 | - | 5 | V |
Operating Temperature Range | -40 | +25 | +85 | °C |
Software Support
We provide a library for the I2C MUX 6 Click Board™ as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
The package can be downloaded/installed directly from NECTO Studio The package Manager (recommended), downloaded from our LibStock™ or found on MikroE Github account.
Library Description
This library contains API for the I2C MUX 6 Click Board™ driver.
Key functions
-
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.
Example Description
This example demonstrates the use of the 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 respectively.
void application_task ( void )
{
uint8_t device_id;
if ( I2CMUX6_OK == i2cmux6_set_channel ( &i2cmux6, DEVICE0_POSITION, DEVICE0_SLAVE_ADDRESS ) )
{
log_printf( &logger, "rn Active Channel: - " );
for ( uint8_t cnt = 0; cnt < 4; cnt++ )
{
if ( ( DEVICE0_POSITION ) & ( 1 << cnt ) )
{
log_printf( &logger, "%u - ", ( uint16_t ) ( cnt + 1 ) );
}
}
if ( I2CMUX6_OK == i2cmux6_generic_read ( &i2cmux6, DEVICE0_REG_ID, &device_id, 1 ) )
{
log_printf( &logger, "rn %s - Device ID: 0x%.2Xrn", ( char * ) DEVICE0_NAME, ( uint16_t ) device_id );
}
Delay_ms( 1000 );
}
if ( I2CMUX6_OK == i2cmux6_set_channel ( &i2cmux6, DEVICE1_POSITION, DEVICE1_SLAVE_ADDRESS ) )
{
log_printf( &logger, "rn Active Channel: - " );
for ( uint8_t cnt = 0; cnt < 4; cnt++ )
{
if ( ( DEVICE1_POSITION ) & ( 1 << cnt ) )
{
log_printf( &logger, "%u - ", ( uint16_t ) ( cnt + 1 ) );
}
}
if ( I2CMUX6_OK == i2cmux6_generic_read ( &i2cmux6, DEVICE1_REG_ID, &device_id, 1 ) )
{
log_printf( &logger, "rn %s - Device ID: 0x%.2Xrn", ( 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 The package Manager (recommended), downloaded from our LibStock™ or found on MikroE Github account.
Other MikroE Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.I2CMUX6
Additional Notes and Information
Depending on the development board you are using, you may need USB UART Click Board™, 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
The I2C MUX 6 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.
Software Support
We provide a library for the I2C MUX 6 Click Board™ as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
The package can be downloaded/installed directly from NECTO Studio The package Manager (recommended), downloaded from our LibStock™ or found on MikroE Github account.
Library Description
This library contains API for the I2C MUX 6 Click Board™ driver.
Key functions
-
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.
Example Description
This example demonstrates the use of the 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 respectively.
void application_task ( void )
{
uint8_t device_id;
if ( I2CMUX6_OK == i2cmux6_set_channel ( &i2cmux6, DEVICE0_POSITION, DEVICE0_SLAVE_ADDRESS ) )
{
log_printf( &logger, "rn Active Channel: - " );
for ( uint8_t cnt = 0; cnt < 4; cnt++ )
{
if ( ( DEVICE0_POSITION ) & ( 1 << cnt ) )
{
log_printf( &logger, "%u - ", ( uint16_t ) ( cnt + 1 ) );
}
}
if ( I2CMUX6_OK == i2cmux6_generic_read ( &i2cmux6, DEVICE0_REG_ID, &device_id, 1 ) )
{
log_printf( &logger, "rn %s - Device ID: 0x%.2Xrn", ( char * ) DEVICE0_NAME, ( uint16_t ) device_id );
}
Delay_ms( 1000 );
}
if ( I2CMUX6_OK == i2cmux6_set_channel ( &i2cmux6, DEVICE1_POSITION, DEVICE1_SLAVE_ADDRESS ) )
{
log_printf( &logger, "rn Active Channel: - " );
for ( uint8_t cnt = 0; cnt < 4; cnt++ )
{
if ( ( DEVICE1_POSITION ) & ( 1 << cnt ) )
{
log_printf( &logger, "%u - ", ( uint16_t ) ( cnt + 1 ) );
}
}
if ( I2CMUX6_OK == i2cmux6_generic_read ( &i2cmux6, DEVICE1_REG_ID, &device_id, 1 ) )
{
log_printf( &logger, "rn %s - Device ID: 0x%.2Xrn", ( 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 The package Manager (recommended), downloaded from our LibStock™ or found on MikroE Github account.
Other MikroE Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.I2CMUX6
Additional Notes and Information
Depending on the development board you are using, you may need USB UART Click Board™, 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
The I2C MUX 6 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.
I2C MUX 6 Click-Platine
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.