How does it work?
I2C Extend 2 Click is based on the PCA9615, a Fast-Mode Plus (FM+) I2C bus buffer that extends the single-ended I2C bus through electrically noisy environments from NXP Semiconductor. It consists of two single-ended to differential driver channels for the SCL (Serial Clock) and SDA (Serial Data). The use of differential transmission lines between identical I2C bus buffers removes electrical noise and common-mode offsets that are present when signal lines must pass between different voltage domains, such as high energy power supplies and electric motors. Those signals can reach distances of up to 3m or longer at lower clock speeds while maintaining signal integrity sent over an Ethernet cable (a twisted-pair transmission line cable) through the onboard RJ-45 connector.
The PCA9615 converts the two default I2C signals into four differential signals, two for SCL and two for SDA. The signal direction is determined by the I2C protocol, which means it does not require a direction signal, as these bus buffers automatically set signal flow direction. Additional circuitry allows the PCA9615 to be used for ‘hot-swap’ applications, where systems are always ON but require insertion or removal of modules or cards without disruption to existing signals. Because the supply voltages on the I2C bus side may be different from the external I2C bus side, there are two power supply pins and common ground. First is a standard I2C bus side power supply selected via the VCC SEL jumper, and the other represents the majority supply for circuitry determined by the VDD SEL jumper.
I2C Extend 2 Click communicates with MCU using the standard I2C interface with a frequency up to 100kHz in the Standard and 400kHz in the Fast Mode, and up to 1MHz in the Fast Mode Plus. The user must be cautious not to overload the driver’s current rating of 3mA for Standard and Fast Modes and 30mA for Fast Mode Plus (FM+). Also, this Click board™ has an Enable pin, routed on the CS pin of the mikroBUS™ socket labeled as EN, used to disable the bus buffer, and is useful for fault finding, Power-Up sequencing, or re-configuration of a bus system by isolating sections not needed at all times.
This Click board™ is designed to operate with both 3.3V and 5V logic voltage levels selected via the VCC SEL jumper. It allows for both 3.3V and 5V capable MCUs to use the I2C communication lines properly. However, the Click board™ comes equipped with a library that contains easy to use functions and an example code which can be used, as a reference, for further development.
Specifications
Type
I2C
Applications
Can be used for various applications that require extending the I2C bus over a long distance, such as commercial lighting and industrial control, control of power supplies in a high noise environment, and more.
On-board modules
I2C Extend 2 Click is based on the PCA9615, a Fast-Mode Plus (FM+) I2C bus buffer that extends the single-ended I2C bus through electrically noisy environments from NXP Semiconductor.
Key Features
Low power consumption, improved resistance to system noise, hot swap, supports arbitration and clock stretching, bus idle detect, 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 Extend 2 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 | Power Supply Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
JP2 | VDD SEL | Left | Differential Side Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
I2C Extend 2 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | -0.5 | – | 6 | V |
Maximum Output Current | – | – | 80 | mA |
Data Rate | – | – | 1 | MHz |
Operating Temperature Range | -40 | – | +85 | °C |
Software Support
We provide a library for the I2C Extend 2 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 to control I2C Extend 2 Click board™. Library performs a standard I2C interface communication.
Key functions:
void i2cextend2_rmt_write ( uint8_t rmt_slave_addr, uint8_t reg, uint8_t tx_data )
– Generic write data to the remote device function.uint8_t i2cextend2_rmt_read ( uint8_t rmt_slave_addr, uint8_t reg )
– Generic read data from the remote device function.void i2cextend2_enable ( uint8_t en_extend )
– Enable extend function.
Examples description
The application is composed of three sections :
- System Initialization – Initializes I2C, set CS pin as outputs and begins to write log.
- Application Initialization – Initialization driver enables – I2C, check communication with device 6DOF IMU 11 Click connected to the I2C Extend 2 Click, set default configuration and start measurement.
- Application Task – (code snippet) This is an example which demonstrates the use of I2C Extend 2 Click board™. In this example, we read Accel and Mag axis of the connected 6DOF IMU 11 Click board™ to the I2C Extend 2 Click which is connected by a LAN cable to I2C Extend 2 Click placed in the mikroBUS 1. Results are being sent to the Usart Terminal where you can track their changes. All data logs write on USB uart changes for every 2 sec.
void application_task ( ) { mikrobus_logWrite( " Accel | Mag ", _LOG_LINE ); mikrobus_logWrite( "------------------------", _LOG_LINE ); i2cextend2_6dofimu11_get_axis( C6DOFIMU11_REG_ACCEL_XOUT_L ); mikrobus_logWrite( " X :", _LOG_TEXT ); IntToStr( axis, log_text ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " | ", _LOG_TEXT ); i2cextend2_6dofimu11_get_axis( C6DOFIMU11_REG_MAG_XOUT_L ); mikrobus_logWrite( " X :", _LOG_TEXT ); IntToStr( axis, log_text ); mikrobus_logWrite( log_text, _LOG_LINE ); i2cextend2_6dofimu11_get_axis( C6DOFIMU11_REG_ACCEL_YOUT_L ); mikrobus_logWrite( " Y :", _LOG_TEXT ); IntToStr( axis, log_text ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " | ", _LOG_TEXT ); i2cextend2_6dofimu11_get_axis( C6DOFIMU11_REG_MAG_YOUT_L ); mikrobus_logWrite( " Y :", _LOG_TEXT ); IntToStr( axis, log_text ); mikrobus_logWrite( log_text, _LOG_LINE ); i2cextend2_6dofimu11_get_axis( C6DOFIMU11_REG_ACCEL_ZOUT_L ); mikrobus_logWrite( " Z :", _LOG_TEXT ); IntToStr( axis, log_text ); mikrobus_logWrite( log_text, _LOG_TEXT ); mikrobus_logWrite( " | ", _LOG_TEXT ); i2cextend2_6dofimu11_get_axis( C6DOFIMU11_REG_MAG_ZOUT_L ); mikrobus_logWrite( " Z :", _LOG_TEXT ); IntToStr( axis, log_text ); mikrobus_logWrite( log_text, _LOG_LINE ); mikrobus_logWrite( "------------------------", _LOG_LINE ); Delay_ms( 1000 ); }
void i2cextend2_6dofimu11_get_axis ( uint8_t axis_out_reg )
– Read axis.
The full application code, and ready to use projects can be found on our LibStock page.
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 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.
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.