expand15
2.1.0.0
|
Expand 15 Click is a compact add-on board that contains a multi-channel I/O expander. This board features the TCAL6416, a general-purpose I/O expansion for most microcontroller families from Texas Instruments.
We provide a library for the Expand 15 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 15 Click driver.
expand15_cfg_setup
Config Object Initialization function. expand15_init
Initialization function. expand15_default_cfg
Click Default Configuration function. expand15_hw_reset
Expand 15 hardware reset function. expand15_get_in_pin_state
Expand 15 get input pin state function. expand15_set_out_pin_state
Expand 15 set output pin state function. This example demonstrates the use of Expand 15 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 the port 0 and port 1 pins as output ( P00, P02, P04, P06, P10, P12, P14 and P16) and the half of the port 0 and port 1 pins as inputs ( P01, P03, P05, P07, P11, P13, P15 and P17).
Sets the state of the output pins of one port and then reads the status of input pins of that port
and displays the results on the USB UART approximately 2 seconds.
In order for this example to work as intended it is necessary to connect the input and output pins
eg. P00 and P01, P02 and P03 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.