OFF
MIKROE-1874
25 g
Status:
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Ω. This Click board™ is suitable as a port expander for MCUs, remote multichannel sensor/actuator, communication and control unit of a micro-terminal, or as the network interface of a microcontroller.
Expand 3 Click is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.
This product is no longer in stock
Availability date:
Expand 3 Click is based on the DS2408, an 8-channel programmable I/O expander from Analog Devices. The DS2408 comes with a factory-lasered 64-bit registration number that allows multiple same Click boards™ to be connected on the same data line. It communicates with the host MCU through a standard Dallas Semiconductor 1-Wire interface (15.3kbps or 100kbps), with PIO outputs configured as open-drain providing a maximum on-resistance of 100Ω. A robust PIO channel-access communication protocol ensures that PIO output-setting changes occur error-free making it suitable to latch PIO logic states into external circuitry such as a D/A converter (DAC) or microcontroller data bus.
This Click board™ communicates with MCU using the 1-Wire interface that, by definition, requires only one data line (and ground) for communication with MCU. In the absence of main power supply, data line can also power the sensor parasitically. The 1-Wire communication line is routed to the GP SEL jumper allowing the 1-Wire communication signal to the PWM pin or the AN pin of the mikroBUS™ socket. These pins are labeled OW0 and OW1, respectively, the same as the SMD jumper positions, making selecting the desired pin straightforward. Besides, the user is provided with the possibility of external use of the data line (OW) through the unpopulated header in the manner and needs that best suit the desired application, alongside a reset feature.
Each DS2408 has its own unalterable and unique 64-bit ROM registration number that is, as mentioned, factory-lasered into the chip. The registration number guarantees unique identification and addresses the device in a multidrop 1-Wire net environment. Multiple DS2408 devices can reside on a common 1-Wire bus and can operate independently of each other. The DS2408 also supports 1-Wire conditional search capability based on programmable PIO conditions or Power-on-Reset activity.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the PWR SEL jumper. This way, it is allowed for both 3.3V and 5V capable MCUs to use the communication lines properly. However, the Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used, as a reference, for further development.
Type
Port expander
Applications
Can be used as a port expander for MCUs, remote multichannel sensor/actuator, communication and control unit of a micro-terminal, or as the network interface of a microcontroller
On-board modules
DS2408 - programmable I/O expander from Analog Devices
Key Features
8-channel bidirectional I/O port, 1-Wire interface, on-resistane of 100Ω maximum, PIO outputs configured as open-drain , reset feature, low power consumption, and more
Interface
1-Wire
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V or 5V
This table shows how the pinout on Expand 3 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED Indicator |
JP1 | GP SEL | Left | Communication Pin Selection OW0/OW1: Left position OW0, Right position OW1 |
JP2 | PWR SEL | Left | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
HD1 | P0-P7 | Unpopulated | I/O Expander Header |
HD2 | OW | Unpopulated | 1-Wire Interface Signal Header |
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | - | 5 | V |
On-Resistance | - | - | 100 | Ω |
Data Rate | - | 15.3 | 100 | kbps |
We provide a library for the Expand 3 Click as well as a demo application (example), developed using MIKROE compilers. The demo can run on all the main MIKROE development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on MIKROE github account.
Library Description
This library contains API for Expand 3 Click driver.
Key functions
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.
Example Description
This example demonstrates the use of Expand 3 Click by setting and reading the port state.
void application_task ( void )
{
static uint8_t out_state = 0;
static uint8_t in_state = 0;
if ( ( EXPAND3_OK == expand3_write_state ( &expand3, out_state ) ) &&
( EXPAND3_OK == expand3_read_last_state ( &expand3, &out_state ) ) )
{
log_printf( &logger, " Output state: 0x%.2Xrnn", out_state++ );
}
if ( EXPAND3_OK == expand3_read_current_state ( &expand3, &in_state ) )
{
log_printf( &logger, " Input state: 0x%.2Xrnn", in_state );
}
Delay_ms ( 500 );
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager (recommended), 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 MIKROE compilers.
This Click board™ is supported with mikroSDK - MIKROE Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.
NOTE: Please be advised that any peripheral devices or accessories shown connected to the Click board™ are not included in the package. Check their availability in our shop or in the YMAN section below.