expand11 2.1.0.0
|
Expand 11 Click is a compact add-on board that contains a multi-port I/O expander. This board features the TCA9536, a general-purpose remote I/O expansion for most microcontroller families from Texas Instruments. The TCA9536 comes in a 4-port configuration and allows easy addition of I/O through a standard I2C serial interface. Each port is user-configurable to either a logic input or logic output by writing to the I/O configuration register bits. The data for each input or output is kept in the corresponding input or output register. There is an additional special function register that port P3, in addition to its standard I/O function, can also configure as an interrupt feature.
We provide a library for the Expand 11 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 11 Click driver.
expand11_cfg_setup
Config Object Initialization function. expand11_init
Initialization function. expand11_default_cfg
Click Default Configuration function. expand11_set_pin_direction
This function sets the direction of the selected pins. expand11_set_all_pins_value
This function sets the value of all output pins. expand11_read_port_value
This function reads the value of the port input pins. This example demonstrates the use of Expand 11 click board by setting and reading the port state.
The demo application is composed of two sections :
Initializes the driver and performs the click default configuration which sets the pins P0-P1 as output and P2-P3 as input.
Toggles all output pins and then reads the status of the whole port and displays the results on the USB UART approximately once per second.
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.