Expand 15 Klickbrett
Expand 15 Klickbrett
Key Features
- Ermöglicht bidirektionale Spannungspegelumsetzung und GPIO-Erweiterung, geringen Stromverbrauch, schnelle I2C-Schnittstelle, wählbare I2C-Adresse, Reset- und Interrupt-Funktionen, Polaritätsumkehrregister, verschiedene programmierbare Funktionen wie Ausgangsantriebsstärke, Pull-Widerstände und mehr
- Basierend auf dem TCAL6416 - I/O-Expander von Texas Instruments
- Es bietet eine einfache Lösung, wenn zusätzliche E/As für Schalter, Sensoren, Drucktasten, LEDs, Lüfter und mehr benötigt werden
- mikroBUS: I2C-Schnittstelle
Wir präsentieren das Expand 15 Click Board™: Ein leistungsstarker Mehrkanal-E/A-Expander
Entfesseln Sie das Potenzial Ihres Mikrocontrollers mit dem Expand 15 Click Board™, einem kompakten und vielseitigen Mehrkanal-E/A-Expander. Diese leistungsstarke Zusatzplatine verfügt über den TCAL6416, eine hochwertige, universelle E/A-Erweiterung von Texas Instruments, die mit den meisten Mikrocontrollerfamilien kompatibel ist. Profitieren Sie von beispiellosem Komfort und Flexibilität, indem Sie ganz einfach E/A über die standardmäßige serielle I2C-Schnittstelle hinzufügen.
Anpassbar und funktionsreich für maximale Vielseitigkeit
Der benutzerkonfigurierbare P-Port gewährleistet eine nahtlose Integration in die Anforderungen Ihres Projekts und ermöglicht Ihnen die Wahl zwischen Logikeingabe oder -ausgabe durch Anpassen der E/A-Konfigurationsregisterbits. Das Expand 15 Click Board™ bietet verschiedene zusätzliche Funktionen, darunter programmierbare Ausgangstreiberstärke, Pull-Up- und Pull-Down-Widerstände, verriegelbare Eingänge, maskierbarer Interrupt, Interrupt-Statusregister und programmierbare Open-Drain- oder Push-Pull-Ausgänge. Es ist die perfekte Lösung zur Erweiterung Ihrer E/A-Funktionen für Schalter, Sensoren, Drucktasten, LEDs, Lüfter und mehr.
Mühelose Softwareentwicklung mit mikroSDK-Unterstützung
Optimieren Sie Ihren Softwareentwicklungsprozess mit dem Expand 15 Click Board™, unterstützt durch eine mikroSDK-kompatible Bibliothek. Diese Bibliothek enthält benutzerfreundliche Funktionen, die die Softwareentwicklung zum Kinderspiel machen. Als vollständig getestetes Produkt ist das Expand 15 Click Board™ sofort einsatzbereit auf jedem System, das mit der mikroBUS™-Buchse ausgestattet ist. Verbessern Sie Ihre Projekte und erweitern Sie die Fähigkeiten Ihres Mikrocontrollers noch heute mit dem Expand 15 Click Board™!
How Does The Expand 15 Click Board™ Work?
The Expand 15 Click Board™ is based on the TCAL6416, a general-purpose I/O expander from Texas Instruments. The TCAL6416 comes in one P-port configuration and allows easy addition of I/O through a standard I2C serial interface. Its digital core consists of 8-bit data registers, allowing users to configure the I/O port characteristics. The I/Os are configured as inputs at Power-On or after a Reset condition. However, the host controller can configure the I/Os as either inputs or outputs by writing to the Configuration registers. The data for each input or output is kept in the corresponding Input Port or Output Port register, with the possibility to invert the polarity of the Input Port with the Polarity Inversion register. The P-port channels configured as outputs can sink up to 25mA for directly driving LEDs, but the current must be limited externally with additional resistance.
Additionally, the TCAL6416 has Agile I/O functionality specifically targeted to enhance the I/O ports, including programmable output drive strength, programmable pull-up and pull-down resistors, latchable inputs, maskable interrupts, interrupt status register, and programmable open-drain or push-pull outputs. These configuration registers improve the I/O by increasing flexibility and allowing users to optimize their power consumption, speed, and EMI design.
This Click board™ communicates with MCU using the standard I2C 2-Wire interface to read data and configure settings with a maximum frequency of 1MHz. Also, the TCAL6416 allows choosing the least significant bits (LSB) of its I2C slave address using the SMD jumper labelled ADDR SEL. It also possesses a general reset signal routed on the RST pin of the mikroBUS™ socket to reset the TCAL6416, and an additional interrupt signal, routed on the INT pin of the mikroBUS™ socket whenever an input port changes state.
The Expand 15 Click Board™ can only be operated with a 3.3V logic voltage level. Additionally, there is a possibility for the TCAL6416 power supply selection via jumper labelled VCCP SEL to supply the TCAL6416 from 1.08V to 3.6V external power supply (V pin) or with 3V3 mikroBUS™ power rail. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. 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.
SPECIFICATIONS
Type | Port expander |
Applications | It provides a simple solution when additional I/Os are needed for switches, sensors, push-buttons, LEDs, fans, and more. |
On-board modules | TCAL6416 - I/O expander from Texas Instruments |
Key Features | Allows bidirectional voltage-level translation and GPIO expansion, low power consumption, fast I2C interface, selectable I2C address, reset and interrupt features, polarity inversion register, various programmable features like output drive strength, pull resistors, and more |
Interface | I2C |
Compatibility | mikroBUS |
Click board size | M (42.9 x 25.4 mm) |
Input Voltage | 3.3V,External |
PINOUT DIAGRAM
This table shows how the pinout of the Expand 15 Click Board™ corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Notes | Pin | Pin | Notes | ||||
---|---|---|---|---|---|---|---|
NC | 1 | AN | PWM | 16 | NC | ||
Reset | RST | 2 | RST | INT | 15 | INT | Interrupt |
NC | 3 | CS | RX | 14 | NC | ||
NC | 4 | SCK | TX | 13 | NC | ||
NC | 5 | MISO | SCL | 12 | SCL | I2C Clock | |
NC | 6 | MOSI | SDA | 11 | SDA | I2C Data | |
Power Supply | 3.3V | 7 | 3.3V | 5V | 10 | NC | |
Ground | GND | 8 | GND | GND | 9 | GND | Ground |
ONBOARD SETTINGS AND INDICATORS
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | - | Power LED Indicator |
JP1 | VCCP SEL | Left | TCAL6416 Power Supply Selection 3V3/VEXT: Left position 3V3, Right position VEXT |
JP2 | ADDR SEL | Left | I2C Address Selection 0/1: Left position 0, Right position 1 |
EXPAND 15 CLICK ELECTRICAL SPECIFICATIONS
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | - | 3.3 | - | V |
External Power Supply VEXT | 1.08 | - | 3.6 | V |
Software Support
Software Support
We provide a library for the Expand 15 Click Board™ and a demo application (example), developed using MikroE compilers. The demo can run on all the main MikroE development boards.
The package can be downloaded/installed directly from NECTO Studio The package Manager (recommended), downloaded from our LibStock™ or found on the MikroE Github account.
Library Description
This library contains API for the Expand 15 Click Board™ driver.
Key functions
-
expand15_hw_reset
Expand 15 hardware reset function. -
expand15_get_in_pin_state
Expand 15 get input pin state function. -
expand15_set_out_pin_state
Expand 15 set output pin state function.
Example Description
This example demonstrates the use of Expand 15 Click board™ by setting and reading the ports state.
void application_task ( void )
{
uint8_t output_pin_state;
uint8_t input_pin_state;
// Setting port0 output pin ( P00, P02, P04 and P06 ) to high
output_pin_state = EXPAND15_PIN_00_MASK | EXPAND15_PIN_02_MASK | EXPAND15_PIN_04_MASK | EXPAND15_PIN_06_MASK;
expand15_set_out_pin_state( &expand15, EXPAND15_PORT_0, output_pin_state );
Delay_ms( 10 );
// Checking state of the input pins on port0
expand15_get_in_pin_state( &expand15, EXPAND15_PORT_0, &input_pin_state );
log_printf( &logger, "OUTPUT PINS HIGH rn" );
log_printf( &logger, "INPUT PINS |" );
log_printf( &logger, " P01 : %c |", ( ( input_pin_state & EXPAND15_PIN_01_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, " P03 : %c |", ( ( input_pin_state & EXPAND15_PIN_03_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, " P05 : %c |", ( ( input_pin_state & EXPAND15_PIN_05_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, " P07 : %c rn", ( ( input_pin_state & EXPAND15_PIN_07_MASK ) ? 'H' : 'L' ) );
Delay_ms( 500 );
// Setting port0 output pin ( P00, P02, P04 and P06 ) to low
output_pin_state = EXPAND15_ALL_PINS_OFF;
expand15_set_out_pin_state( &expand15, EXPAND15_PORT_0, output_pin_state );
Delay_ms( 10 );
// Checking state of the input pins on port0
expand15_get_in_pin_state( &expand15, EXPAND15_PORT_0, &input_pin_state );
log_printf( &logger, "OUTPUT PINS LOW rn" );
log_printf( &logger, "INPUT PINS |" );
log_printf( &logger, " P01 : %c |", ( ( input_pin_state & EXPAND15_PIN_01_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, " P03 : %c |", ( ( input_pin_state & EXPAND15_PIN_03_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, " P05 : %c |", ( ( input_pin_state & EXPAND15_PIN_05_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, " P07 : %c rn", ( ( input_pin_state & EXPAND15_PIN_07_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, "- - - - - - - - - - - - - - - - - - - - - - - - - - rn" );
Delay_ms( 2000 );
// Setting port1 output pin ( P10, P12, P14 and P01 ) to high
output_pin_state = EXPAND15_PIN_10_MASK | EXPAND15_PIN_12_MASK | EXPAND15_PIN_14_MASK | EXPAND15_PIN_16_MASK;
expand15_set_out_pin_state( &expand15, EXPAND15_PORT_1, output_pin_state );
Delay_ms( 10 );
// Checking state of the input pins on port1
expand15_get_in_pin_state( &expand15, EXPAND15_PORT_1, &input_pin_state );
log_printf( &logger, "OUTPUT PINS HIGH rn" );
log_printf( &logger, "INPUT PINS |" );
log_printf( &logger, " P11 : %c |", ( ( input_pin_state & EXPAND15_PIN_11_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, " P13 : %c |", ( ( input_pin_state & EXPAND15_PIN_13_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, " P15 : %c |", ( ( input_pin_state & EXPAND15_PIN_15_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, " P17 : %c rn", ( ( input_pin_state & EXPAND15_PIN_17_MASK ) ? 'H' : 'L' ) );
Delay_ms( 500 );
// Setting port1 output pin ( P10, P12, P14 and P16 ) to low
output_pin_state = EXPAND15_ALL_PINS_OFF;
expand15_set_out_pin_state( &expand15, EXPAND15_PORT_1, output_pin_state );
Delay_ms( 10 );
// Checking state of the input pins on port1
expand15_get_in_pin_state( &expand15, EXPAND15_PORT_1, &input_pin_state );
log_printf( &logger, "OUTPUT PINS LOW rn" );
log_printf( &logger, "INPUT PINS |" );
log_printf( &logger, " P11 : %c |", ( ( input_pin_state & EXPAND15_PIN_11_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, " P13 : %c |", ( ( input_pin_state & EXPAND15_PIN_13_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, " P15 : %c |", ( ( input_pin_state & EXPAND15_PIN_15_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, " P17 : %c rn", ( ( input_pin_state & EXPAND15_PIN_17_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, "- - - - - - - - - - - - - - - - - - - - - - - - - - rn" );
Delay_ms( 2000 );
}
The full application code, and ready to use projects can be installed directly from NECTO Studio The package Manager (recommended), downloaded from our LibStock™ or found on MikroE Github account.
Other MikroE Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.Expand15
Additional Notes and Information
Depending on the development board you are using, you may need USB UART Click Board™, 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.
MIKROSDK
The Expand 15 Click Board™ is supported with mikroSDK - MikroE Software Development Kit, that needs to be downloaded from the LibStock and installed for the compiler you are using to ensure proper operation of mikroSDK compliant Click board™ demo applications.
Software Support
Software Support
We provide a library for the Expand 15 Click Board™ and a demo application (example), developed using MikroE compilers. The demo can run on all the main MikroE development boards.
The package can be downloaded/installed directly from NECTO Studio The package Manager (recommended), downloaded from our LibStock™ or found on the MikroE Github account.
Library Description
This library contains API for the Expand 15 Click Board™ driver.
Key functions
-
expand15_hw_reset
Expand 15 hardware reset function. -
expand15_get_in_pin_state
Expand 15 get input pin state function. -
expand15_set_out_pin_state
Expand 15 set output pin state function.
Example Description
This example demonstrates the use of Expand 15 Click board™ by setting and reading the ports state.
void application_task ( void )
{
uint8_t output_pin_state;
uint8_t input_pin_state;
// Setting port0 output pin ( P00, P02, P04 and P06 ) to high
output_pin_state = EXPAND15_PIN_00_MASK | EXPAND15_PIN_02_MASK | EXPAND15_PIN_04_MASK | EXPAND15_PIN_06_MASK;
expand15_set_out_pin_state( &expand15, EXPAND15_PORT_0, output_pin_state );
Delay_ms( 10 );
// Checking state of the input pins on port0
expand15_get_in_pin_state( &expand15, EXPAND15_PORT_0, &input_pin_state );
log_printf( &logger, "OUTPUT PINS HIGH rn" );
log_printf( &logger, "INPUT PINS |" );
log_printf( &logger, " P01 : %c |", ( ( input_pin_state & EXPAND15_PIN_01_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, " P03 : %c |", ( ( input_pin_state & EXPAND15_PIN_03_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, " P05 : %c |", ( ( input_pin_state & EXPAND15_PIN_05_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, " P07 : %c rn", ( ( input_pin_state & EXPAND15_PIN_07_MASK ) ? 'H' : 'L' ) );
Delay_ms( 500 );
// Setting port0 output pin ( P00, P02, P04 and P06 ) to low
output_pin_state = EXPAND15_ALL_PINS_OFF;
expand15_set_out_pin_state( &expand15, EXPAND15_PORT_0, output_pin_state );
Delay_ms( 10 );
// Checking state of the input pins on port0
expand15_get_in_pin_state( &expand15, EXPAND15_PORT_0, &input_pin_state );
log_printf( &logger, "OUTPUT PINS LOW rn" );
log_printf( &logger, "INPUT PINS |" );
log_printf( &logger, " P01 : %c |", ( ( input_pin_state & EXPAND15_PIN_01_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, " P03 : %c |", ( ( input_pin_state & EXPAND15_PIN_03_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, " P05 : %c |", ( ( input_pin_state & EXPAND15_PIN_05_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, " P07 : %c rn", ( ( input_pin_state & EXPAND15_PIN_07_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, "- - - - - - - - - - - - - - - - - - - - - - - - - - rn" );
Delay_ms( 2000 );
// Setting port1 output pin ( P10, P12, P14 and P01 ) to high
output_pin_state = EXPAND15_PIN_10_MASK | EXPAND15_PIN_12_MASK | EXPAND15_PIN_14_MASK | EXPAND15_PIN_16_MASK;
expand15_set_out_pin_state( &expand15, EXPAND15_PORT_1, output_pin_state );
Delay_ms( 10 );
// Checking state of the input pins on port1
expand15_get_in_pin_state( &expand15, EXPAND15_PORT_1, &input_pin_state );
log_printf( &logger, "OUTPUT PINS HIGH rn" );
log_printf( &logger, "INPUT PINS |" );
log_printf( &logger, " P11 : %c |", ( ( input_pin_state & EXPAND15_PIN_11_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, " P13 : %c |", ( ( input_pin_state & EXPAND15_PIN_13_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, " P15 : %c |", ( ( input_pin_state & EXPAND15_PIN_15_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, " P17 : %c rn", ( ( input_pin_state & EXPAND15_PIN_17_MASK ) ? 'H' : 'L' ) );
Delay_ms( 500 );
// Setting port1 output pin ( P10, P12, P14 and P16 ) to low
output_pin_state = EXPAND15_ALL_PINS_OFF;
expand15_set_out_pin_state( &expand15, EXPAND15_PORT_1, output_pin_state );
Delay_ms( 10 );
// Checking state of the input pins on port1
expand15_get_in_pin_state( &expand15, EXPAND15_PORT_1, &input_pin_state );
log_printf( &logger, "OUTPUT PINS LOW rn" );
log_printf( &logger, "INPUT PINS |" );
log_printf( &logger, " P11 : %c |", ( ( input_pin_state & EXPAND15_PIN_11_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, " P13 : %c |", ( ( input_pin_state & EXPAND15_PIN_13_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, " P15 : %c |", ( ( input_pin_state & EXPAND15_PIN_15_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, " P17 : %c rn", ( ( input_pin_state & EXPAND15_PIN_17_MASK ) ? 'H' : 'L' ) );
log_printf( &logger, "- - - - - - - - - - - - - - - - - - - - - - - - - - rn" );
Delay_ms( 2000 );
}
The full application code, and ready to use projects can be installed directly from NECTO Studio The package Manager (recommended), downloaded from our LibStock™ or found on MikroE Github account.
Other MikroE Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.Expand15
Additional Notes and Information
Depending on the development board you are using, you may need USB UART Click Board™, 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.
MIKROSDK
The Expand 15 Click Board™ is supported with mikroSDK - MikroE Software Development Kit, that needs to be downloaded from the LibStock and installed for the compiler you are using to ensure proper operation of mikroSDK compliant Click board™ demo applications.
Expand 15 Klickbrett
Frequently Asked Questions
Ask a Question-
Is the Expand 15 Click Board™ easy to use?
Yes, the Expand 15 Click Board™ is easy to use. It comes with a mikroSDK-compliant library that includes functions to simplify software development. The board is also fully tested and ready for use on a system equipped with the mikroBUS™ socket.
-
What applications can the Expand 15 Click Board™ be used for?
The Expand 15 Click Board™ is ideal for applications that require additional I/Os, such as switches, sensors, push-buttons, LEDs, fans, and more.
-
What additional features does the TCAL6416 offer?
The TCAL6416 offers programmable output drive strength, pull-up and pull-down resistors, latchable inputs, maskable interrupt, interrupt status register, and programmable open-drain or push-pull outputs.
-
What is the P-port configuration on the TCAL6416?
The TCAL6416 comes in one P-port configuration, which can be user-configured to either a logic input or output by writing to the I/O configuration register bits.
-
How does the Expand 15 Click Board™ connect to a microcontroller?
The Expand 15 Click Board™ connects to a microcontroller through a standard I2C serial interface.
-
What microcontroller families is the Expand 15 Click Board™ compatible with?
The Expand 15 Click Board™ is compatible with most microcontroller families.
-
What is the Expand 15 Click Board™?
The Expand 15 Click Board™ is a small add-on board that provides multi-channel I/O expansion for microcontrollers. It features the TCAL6416, a general-purpose I/O expander from Texas Instruments.