spiisolator 2.0.0.0
|
SPI Isolator click carries the ADuM4154 5kV digital isolator optimized for a serial peripheral interface (SPI).
We provide a library for the Spiisolator Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
This library contains API for Spiisolator Click driver.
- Initialization function.void spiisolator_cfg_setup ( spiisolator_cfg_t *cfg );
SPIISOLATOR_RETVAL spiisolator_init ( spiisolator_t *ctx, spiisolator_cfg_t *cfg );
- Write the byte of data function.void spiisolator_generic_transfer ( spiisolator_t *ctx, spi_master_transfer_data_t *block );
void spiisolator_write_byte ( spiisolator_t *ctx, uint8_t reg_address, uint8_t write_cmd, uint8_t write_data );
uint8_t spiisolator_read_byte ( spiisolator_t *ctx, uint8_t reg_address, uint8_t read_cmd );
TThe click is designed to run on either 3.3V or 5V power supply. It communicates with the target microcontroller over SPI interface. In this example we have used an 8x8 click board connected to a SPI Isolator click board.
The demo application is composed of two sections :
Initialization driver enables - SPI, set default configuration, also write log.
Controls an 8x8 click board and displays the steps on UART Terminal.
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.
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.