spiextend
2.0.0.0
|
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.
We provide a library for the SPIExtend 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 from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
This library contains API for SPIExtend Click driver.
spiextend_cfg_setup
Config Object Initialization function. spiextend_init
Initialization function. spiextend_default_cfg
Click Default Configuration function. spiextend_get_config
Function get configuration of the LTC4332 SPI Extender Over Rugged Differential Link on the SPI Extend click board. spiextend_set_config
Function set configuration of the LTC4332 SPI Extender Over Rugged Differential Link on the SPI Extend click board. spiextend_get_status
Function set configuration of the LTC4332 SPI Extender Over Rugged Differential Link on the SPI Extend click board. In this example, if the connection is established, we read Accel axis of the connected Accel 14 Click boards to the SPI Extend Click ( Remote Mode ) which is connected by a LAN cable to
SPI Extend Click ( Local Mode ) 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 1 sec.
The demo application is composed of two sections :
Initializes SPI, sets INT pin as input and AN, RST, CS nad PWM pins as outputs and begins to write log. Also, initialization driver enables - SPI, set default configuration of the Accel 14 Click
connected to the SPI Extend Click ( Remote Mode ).
If the click is connected properly then the status becomes active and the X-axis coordinate is printed first on the UART terminal, then Y and finally Z. After 1s the process is repeated.
In case an error has occurred, printed "LINK is not established" on UART Terminal.
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
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.