Développez le tableau de 15 clics
Développez le tableau de 15 clics
Key Features
- Permet une traduction bidirectionnelle du niveau de tension et une extension GPIO, une faible consommation d'énergie, une interface I2C rapide, une adresse I2C sélectionnable, des fonctions de réinitialisation et d'interruption, un registre d'inversion de polarité, diverses fonctions programmables telles que la force de commande de sortie, les résistances de traction, etc.
- Basé sur le TCAL6416 - Extenseur d'E/S de Texas Instruments
- Il fournit une solution simple lorsque des E/S supplémentaires sont nécessaires pour les commutateurs, les capteurs, les boutons-poussoirs, les LED, les ventilateurs, etc.
- mikroBUS : interface I2C
Overview
Présentation de l'Expand 15 Click Board™ : un puissant extenseur d'E/S multicanaux
Libérez le potentiel de votre microcontrôleur avec l'Expand 15 Click Board™, un module d'extension d'E/S multicanaux compact et polyvalent. Cette puissante carte d'extension est dotée du TCAL6416, une extension d'E/S polyvalente de haute qualité conçue par Texas Instruments, compatible avec la plupart des familles de microcontrôleurs. Bénéficiez d'une commodité et d'une flexibilité inégalées en ajoutant facilement des E/S via l'interface série I2C standard.
Personnalisable et riche en fonctionnalités pour une polyvalence maximale
Le port P configurable par l'utilisateur garantit une intégration transparente avec les besoins de votre projet, vous permettant de choisir entre une entrée ou une sortie logique en ajustant les bits du registre de configuration des E/S. L'Expand 15 Click Board™ offre diverses fonctionnalités supplémentaires, notamment une puissance de commande de sortie programmable, des résistances de rappel vers le haut et vers le bas, des entrées verrouillables, une interruption masquable, un registre d'état d'interruption et des sorties programmables à drain ouvert ou push-pull. C'est la solution parfaite pour étendre vos capacités d'E/S pour les commutateurs, les capteurs, les boutons-poussoirs, les LED, les ventilateurs, etc.
Développement de logiciels sans effort avec la prise en charge de mikroSDK
Optimisez votre processus de développement logiciel avec l'Expand 15 Click Board™, pris en charge par une bibliothèque compatible mikroSDK. Cette bibliothèque comprend des fonctions conviviales qui facilitent le développement logiciel. En tant que produit entièrement testé, l'Expand 15 Click Board™ est prêt à être utilisé immédiatement sur tout système équipé du socket mikroBUS™. Améliorez vos projets et étendez les capacités de votre microcontrôleur avec l'Expand 15 Click Board™ dès aujourd'hui !
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.
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.