Expand Click Board
Expand Click Board
Key Features:
- Can be used with a 3.3 or 5V Power Supply
- mikroBUS: SPI Interface
The Expand Click Board™ is an accessory board in mikroBUS form factor. It includes a 16-bit I/O expander MCP23S17 from Microchip with SPI clock speeds up to 10 MHz for higher throughput applications.
Software Support
Application Task
This is an example that demonstrates the use of Expand Click board. Expand Click communicates with register via SPI protocol by write and read from the register, set configuration and state and read configuration and state. Results are being sent to the Usart Terminal where you can track their changes. All data logs on USB uart for approximately every 500 ms.
void application_task ( void )
{
pin_position = 1;
for ( position = 0; position < 8; position++ )
{
expand_write_port_a( &expand, EXPAND_SPI_MODULE_POSITION_0, pin_position );
log_printf( &logger, " PA%d set\r\n", (uint16_t) position );
port_status = expand_read_port_b( &expand, EXPAND_SPI_MODULE_POSITION_0 );
log_printf( &logger, " Status PB (input) : %d \r\n", (uint16_t) port_status );
log_printf( &logger, "----------------\r\n" );
pin_position <<= 1;
Delay_ms( 500 );
}
}
The full application code, and ready to use projects can be installed directly from compilers IDE(recommended) or found on the LibStock page or mikroE GitHub account.
Other mikroE Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.Expand
Additional Notes and Information
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.
Expand Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.