expand17
2.1.0.0
|
Expand 17 Click is a compact add-on board designed to expand the number of input/output pins in your system. This board features the TCAL6408, an 8-bit I/O expander from Texas Instruments, which communicates via the I2C protocol. The TCAL6408 features programmable output drive strength, latchable inputs, pull-up/pull-down resistors, and configurable open-drain or push-pull outputs, offering flexible and enhanced I/O performance with minimal power consumption and reduced EMI.
We provide a library for the Expand 17 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 Expand 17 Click driver.
expand17_cfg_setup
Config Object Initialization function. expand17_init
Initialization function. expand17_default_cfg
Click Default Configuration function. expand17_set_io_dir
This function is used to set input or output direction of pins. expand17_set_output_state
This function is used to set output state of the pins. expand17_get_input_state
This function is used to get state of the input pins. This example demonstrates the use of Expand 17 click board by setting and reading the ports state.
The demo application is composed of two sections :
Initializes the driver and performs the click default configuration which sets
half of pins as output ( IO5, IO6, IO7 and IO8 ) and the half of the pins as inputs ( IO1, IO2, IO3 and IO4 ).
Sets the state of the output pins and then reads the status of the input pins
and displays the results on the USB UART approximately every 2 seconds.
In order for this example to work as intended it is necessary to connect the input and output pins
eg. IO1 and IO5, IO2 and IO6 etc. Floating input pins will be shown as a high state.
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. UART terminal is available in all MikroElektronika compilers.