OFF
MIKROE-4184
23 g
Status:
SPI Extend Click is a compact add-on board for applications that require extending the SPI communication bus over a long distance. This board features the LTC4332, an SPI slave extender device, from Analog Devices. Using a ±60V fault protected differential transceiver, the LTC4332 can transmit SPI data, including an interrupt signal, up to 2MHz over two twisted-pair cables. The extended common-mode range and high common-mode rejection on the differential link provide tolerance to large ground differences between nodes. This Click board™ also provides a control interface using a separate slave select for configuration and fault monitoring. All these features make SPI Extend Click an excellent choice for various applications that require extending the SPI bus over a long distance, such as industrial control, sensor installations, lighting and sound system control, and more.
SPI Extend 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:
NOTE: In order to achieve the complete functionality of this Click board™, it is necessary to use crossover twisted-pair cables with RJ45 connectors, the same ones used with Ethernet devices.
SPI Extend Click is based on LTC4332, a 2MHz point-to-point SPI bus extender designed for operation in high noise industrial environments, IC from Analog Devices. The SPI bus is extended over two twisted pairs by ±60V fault protected differential transceivers. The LTC4332’s extended 25V common-mode voltage range allows it to bridge across different ground potentials. This Click board™ has 3 extended slave selects (SS1, SS2, SS3), has separate programmable SPI modes, and also supports external galvanic isolation on the link. Slave select output pin SS1 is used as a standard CS pin in SPI communication, while the other two pins SS2 and SS3 are used as GPIO output pins on the local side in terms of mikroBUS standard.
Alongside with it’s extended functionalities, this Click board™ also supports local to remote control and interrupt functions. Using an integrated high-performance differential transceiver for link communication, a local SPI master can access remote slave devices up to 1200m using differential-pair type cabling. Because of the dual functionality of the SPI Extend Click, the user needs to set the mode of operation of the Click board™, which is adjusted by setting onboard MODE SEL switch, which allows you to select between two operating modes: RMT and LCL. This Operating Mode Selection switch enables the board to function in local SPI slave mode when set to the LCL position, while setting it to the RMT position configures the board to operate in SPI master mode.
The SPI Extend Click communicates with MCU using the SPI serial interface that supports SPI modes (0,0) and (1,1) only, with a maximum SPI frequency of 2 MHz. The LTC4332 provides a separate slave select pin, SSC, that allows a user to access the internal control interface for configuration and monitoring. It also has an interrupt pin (INT) that acts as an open-drain output in local mode and an input in remote mode. On the remote side, INT is an input pin that can be connected to remote SPI devices, while on the local side INT operates as an open-drain output that can be connected to a shared local interrupt line. In addition to the mode selection, there are SPEED SEL jumpers that select the link baud rate and the remote SCK timing parameters, and Link Status LED indicator that is active when the device successfully establishes link communication between the local and remote sides.
This Click Board™ uses the SPI communication interface with both 3.3V and 5V. The onboard SMD jumper labeled as VCC SEL allows voltage selection for interfacing with both 3.3V and 5V MCUs. More information about the LTC4332’s functionality, electrical specifications, and typical performance 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 the development.
Type
SPI
Applications
An excellent choice for various applications that require extending the SPI bus over a long distance, such as industrial control, sensor installations, lighting and sound system control, and more.
On-board modules
SPI Extend Click is based on LTC4332, a 2MHz point-to-point SPI bus extender designed for operation in high noise industrial environments, IC from Analog Devices.
Key Features
Operation over long distances, extended slave selects, overvoltage protection, low power consumption...
Interface
GPIO,SPI
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 SPI Extend 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 |
LD2 | LINK | - | Link Status LED Indicator |
JP1 | VCC SEL | Left | Power Supply Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
JP2 | SPEED SEL | Left | Communication Speed Selection: Left position 0, Right position 1 |
SW1 | MODE SEL | Right | Local to Remote Control Selection: Left position RMT, Right position LCL |
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | -0.3 | 3.3 | 6 | V |
SPI Serial Clock Frequency | - | - | 2 | mHz |
Extension Range | - | - | 1200 | m |
Operating Temperature Range | 0 | - | 70 | °C |
We provide a library for the SPI Extend 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 SPI Extend click board. Library performs a standard SPI interface communication.
Key functions:
void spiextend_generic_write ( uint8_t reg, uint8_t tx_data )
- Generic write data function.void spiextend_get_config ( spiextend_config_data_t *config_data )
- Get the configuration function.uint8_t spiextend_rmt_read ( uint8_t reg, uint8_t sel_slave )
- Generic read data in Remote Mode function.Examples description
The application is composed of three sections :
void application_task ( ) { spiextend_get_status( &spiextend_status ); if ( spiextend_status.nlink == SPIEXTEND_STATUS_ACTIVE ) { spiextend_accel14_get_axis( SPIEXTEND_ACCEL14_REG_OUTX_L_A ); mikrobus_logWrite( " Accel X : ", _LOG_TEXT ); IntToStr( axis, log_text ); mikrobus_logWrite( log_text, _LOG_LINE ); spiextend_accel14_get_axis( SPIEXTEND_ACCEL14_REG_OUTY_L_A ); mikrobus_logWrite( " Accel Y : ", _LOG_TEXT ); IntToStr( axis, log_text ); mikrobus_logWrite( log_text, _LOG_LINE ); spiextend_accel14_get_axis( SPIEXTEND_ACCEL14_REG_OUTZ_L_A ); mikrobus_logWrite( " Accel Z : ", _LOG_TEXT ); IntToStr( axis, log_text ); mikrobus_logWrite( log_text, _LOG_LINE ); mikrobus_logWrite( "---------------------", _LOG_LINE ); Delay_ms( 1000 ); } else { mikrobus_logWrite( " LINK not established", _LOG_LINE ); mikrobus_logWrite( "---------------------", _LOG_LINE ); Delay_ms( 1000 ); } }
Additional Functions :
void spiextend_accel14_get_axis ( uint8_t axis_out_reg )
- Read axis.void spiextend_display_status ( uint8_t check_status )
- Display status.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.