expand16
2.1.0.0
|
Expand 16 Click is a compact add-on board with a multi-port I/O expander. This board features the FLX6408, a fully configurable 8-bit GPIO expander from ON Semiconductor. It brings eight independently configurable input/output ports, with a 6mA output drive, when configured in the output mode.
We provide a library for the Expand 16 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 16 Click driver.
expand16_cfg_setup
Config Object Initialization function. expand16_init
Initialization function. expand16_default_cfg
Click Default Configuration function. expand16_write_reg
Expand 16 register write function. expand16_set_io_dir
Expand 16 set pin input or output direction function. expand16_set_output_state
Expand 16 set output pins state function. This example demonstrates the use of Expand 16 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 pins as output ( GPIO4, GPIO5, GPIO6 and GPIO7 ) and the other half of the pins as inputs ( GPIO0, GPIO1, GPIO2 and GPIO3 ).
Sets the state of the output pins and then reads the status of input pins
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. GPIO0 and GPIO4, GPIO1 and GPIO5 etc. Floating input pins will be shown as a low 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.