expand3 2.1.0.0
|
Expand 3 Click is a compact add-on board providing general-purpose I/O expansion. This board features the DS2408, an 8-channel programmable I/O expander from Analog Devices. The DS2408 has a factory-lasered 64-bit registration number, enabling multiple Expand 3 Click boards™ to be connected on the same data line, communicating with the host MCU through a standard Dallas Semiconductor 1-Wire interface (15.3kbps or 100kbps). PIO outputs are configured as open-drain and provide a maximum on-resistance of 100Ω.
We provide a library for the Expand 3 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 3 Click driver.
expand3_cfg_setup
Config Object Initialization function. expand3_init
Initialization function. expand3_default_cfg
Click Default Configuration function. expand3_write_state
This function writes data to the PIO output-latch state register which controls the open-drain output transistors of the PIO channels. expand3_read_last_state
This function reads the latest data written to the PIO using expand3_read_current_state
This function reads the current logic state of the PIO pins. This example demonstrates the use of Expand 3 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.
Writes a counter data to the port output pins and reads the status of the same port input pins approximately every 500ms. All data are displayed on the USB UART.
The PIO pins are in the open-drain mode, therefore a pull-up resistor must be added to each pin.
This click board can be used in a combination with an EasyLED [MIKROE-571] and EasyPULL [MIKROE-575] boards.
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.