Carte I2C MUX 6 Click
Carte I2C MUX 6 Click
Key Features
- Faible consommation d'énergie, interface I2C rapide, broches I2C tolérantes à 5 V et d'activation pour prendre en charge le fonctionnement du signal en mode mixte, broches I2C haute impédance hors tension, bus d'extension, etc.
- Basé sur le PCA9518 - tampon bidirectionnel à quatre canaux contrôlable via l'interface série I2C de Texas Instruments
- Peut être utilisé pour diverses applications, des systèmes industriels aux systèmes médicaux, de communication et automobiles
- mikroBUS : interface I2C
Overview
La carte Click Board™ I2C MUX 6 est une carte complémentaire compacte représentant un sélecteur bidirectionnel dédié aux applications de conflits d'adresses esclaves I2C. Cette carte comprend le PCA9518, un tampon bidirectionnel extensible à cinq canaux contrôlé par le bus I2C de Texas Instruments. Le PCA9518 surmonte la restriction de la capacité maximale du bus en séparant et en mettant en mémoire tampon les lignes de données I2C (SDA) et d'horloge (SCL) en plusieurs groupes de canaux I2C de 400 pF. Il active le canal souhaité via une broche d'activation donnée et permet l'extension du bus I2C, via un en-tête d'extension intégré, en mettant en mémoire tampon les lignes de données (SDA) et d'horloge (SCL), ce qui permet un nombre pratiquement illimité de bus de 400 pF. Cette carte Click™ convient à diverses applications industrielles, médicales, de communication et automobiles.
La carte Click Board™ I2C MUX 6 est prise en charge par une bibliothèque compatible mikroSDK, qui comprend des fonctions qui simplifient le développement logiciel. Cette carte Click™ est livrée sous la forme d'un produit entièrement testé, prêt à être utilisé sur un système équipé du socket mikroBUS™.
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.
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.