SPI Isolator 2 Click Board
SPI Isolator 2 Click Board
The SPI Isolator 2 Click Board™ is a compact add-on board that contains a digital isolator optimized for a serial peripheral interface. This board features the ISO7741, a high-performance quad-channel digital isolator with a double capacitive silicon dioxide insulation barrier capable of galvanic isolation up to 5000Vrms from Texas Instruments. The ISO7741 provides high electromagnetic immunity and low emissions at low power consumption while isolating digital I/Os. It has three forward and one reverse-direction channel with enable pins that can be used to put the respective outputs in Hi-Z state. This Click Board™ provides a simple, compact solution for isolated SPI data communication.
The SPI Isolator 2 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.
Software Support
We provide a library for the SPI Isolator 2 Click Board™ 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.
The package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on the mikroE Github account.
Library Description
The library covers all the necessary functions to control the SPI Isolator 2 Click Board™. The library performs a standard SPI interface communication.
Key Functions
void spiisolator2_output_enable ( uint8_t en_out )
- Output enable function.int8_t addr_n_bytes, uint8_t *p_tx_data, uint8_t tx_data_n_bytes )
- Multi write function.uint8_t addr_n_bytes, uint8_t *p_rx_data, uint8_t tx_data_n_bytes )
- Multi read function.
Example Description
The application is composed of three sections :
- System Initialization - Initializes SPI, set RST and CS pin as outputs, begins to write log.
- Application Initialization - Initialization driver enables - SPI, set write/read memory address, enable output, also write log.
- Application Task - (code snippet) This is an example that demonstrates the use of the SPI Isolator 2 Click board™. In this example, we write and then read data from the connected EEPROM 5 click to the SPI Isolator 2 Click board™. Results are being sent to the Usart Terminal where you can track their changes. All data logs write on USB uart change approximately every 5 sec.
void application_task ( ) { spiisolator2_set_cmd( SPIISOLATOR2_EEPROM5_CMD_WRITE_ENABLE ); Delay_ms( 10 ); spiisolator2_multi_write( SPIISOLATOR2_EEPROM5_CMD_WRITE | memory_address, 4, &demo_data[ 0 ], 9 ); mikrobus_logWrite( " Write data : ", _LOG_TEXT ); for ( n_cnt = 0; n_cnt < 9; n_cnt++ ) { mikrobus_logWrite( &demo_data[ n_cnt ], _LOG_BYTE ); } mikrobus_logWrite( "- - - - - - - - - - - ", _LOG_LINE ); Delay_ms( 100 ); mikrobus_logWrite( " Read data : ", _LOG_TEXT ); spiisolator2_multi_read( SPIISOLATOR2_EEPROM5_CMD_READ | memory_address, 4, &read_data[ 0 ], 9 ); Delay_ms( 1000 ); for ( n_cnt = 0; n_cnt < 9; n_cnt++ ) { mikrobus_logWrite( &read_data[ n_cnt ], _LOG_BYTE ); } mikrobus_logWrite( "----------------------", _LOG_LINE ); Delay_ms( 5000 ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other Mikroe Libraries used in the example:
- SPI
- UART
- Conversions
Additional Notes and Information
Depending on the development board you are using, you may need a 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
The SPI Isolator 2 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.
SPI Isolator 2 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.