expand18
2.1.0.0
|
Expand 18 Click is a compact add-on board used for expanding the I/O capabilities of various microcontroller (MCU) systems. This board features the PCAL9714, an ultra-low-voltage 14-bit SPI I/O expander from NXP. This board supports both 3.3V and 5V logic levels, features integrated level shifting for mixed-voltage systems, and operates via a high-speed 5MHz SPI interface. Additionally, it offers Agile I/O capabilities such as programmable output drive strength, latchable inputs, and interrupt management. Expand 18 Click is ideal for interfacing MCUs with sensors, keypads, and push buttons in power-sensitive applications.
We provide a library for the Expand 18 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 18 Click driver.
expand18_cfg_setup
Config Object Initialization function. expand18_init
Initialization function. expand18_default_cfg
Click Default Configuration function. expand18_set_pin_direction
This function sets the direction of the selected pins. expand18_set_all_pins_value
This function sets the value of all output pins. expand18_read_port_value
This function reads the value of the selected port input pins. This example demonstrates the use of Expand 18 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 the port 0 as output and the port 1 as input with pull-down enabled.
Sets the pins of the port 0 and then reads the status of both ports 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.