How does it work?
Terminal 2 Click is an adapter Click board™ used as a mikroBUS™ socket expansion board. This Click board™ provides an easy and elegant solution for adding the external connection capability to the Click board™ and can be connected to the mikroBUS™ socket like any other Click board™. On the central area of the Terminal 2 Click, two 9-position 2.54mm pitch terminal blocks are placed. Each of the terminal pins corresponds to a pin on the mikroBUS™ socket. Thanks to these terminals, the connection with the Click board™ remains firm and stable, retaining a perfect connection quality at all times.
Lines of the mikroBUS™ socket to which Terminal 2 Click is attached are shared through the onboard connectors, which mirrors the connected mikroBUS™ socket pins. Therefore, care should be taken when working with the Terminal 2 Click and connecting an external device to it, because the same pins on the mikroBUS™ are shared, either for the communication (SPI, UART, I2C) or for some other purpose (RST, INT, or other pins used as GPIO).
This Click board™ can operate with both 3.3V and 5V logic voltage levels. This way, it is allowed for both 3.3V and 5V capable MCUs to use the communication lines properly. A green LED visually detects the presence of an active power supply, labeled as PWR. 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
Adapter
Applications
Can be used as a mikroBUS™ socket expansion board
On-board modules
None
Key Features
Easy and elegant solution for adding the external connection capability to the Click board™
Interface
Analog,GPIO,I2C,SPI,UART
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
L (57.15 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on Terminal 2 click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
Software Support
We provide a library for the Terminal 2 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.
Library Description
This library contains API for Terminal 2 Click driver.
Key functions
-
terminal2_set_all_pins_high
This function sets all terminal pins to high logic level. -
terminal2_set_all_pins_low
This function sets all terminal pins to low logic level. -
terminal2_toggle_pin
This function toggles the specified pin logic level.
Example Description
This example demonstates the use of Terminal 2 click board by toggling all its pins.
void application_task ( void )
{
/**< Array of pins object addresses. */
static digital_out_t *pin_addr[ 12 ] =
{
&terminal2.mosi, // 0 MOSI
&terminal2.miso, // 1 MISO
&terminal2.sck, // 2 SCK
&terminal2.cs, // 3 CS
&terminal2.rst, // 4 RST
&terminal2.an, // 5 AN
&terminal2.pwm, // 6 PWM
&terminal2.int_pin, // 7 INT
&terminal2.tx_pin, // 8 TX
&terminal2.rx_pin, // 9 RX
&terminal2.scl, // 10 SCL
&terminal2.sda // 11 SDA
};
static uint8_t pin_num = 0;
log_printf( &logger, " Toggling pin: %urn", ( uint16_t ) pin_num );
terminal2_toggle_pin ( pin_addr[ pin_num ] );
Delay_ms ( 1000 );
terminal2_toggle_pin ( pin_addr[ pin_num ] );
pin_num++;
if ( 12 == pin_num )
{
pin_num = 0;
}
}
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:
- MikroSDK.Board
- MikroSDK.Log
- Click.Terminal2
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.
mikroSDK
This Click board™ is supported with mikroSDK – MikroElektronika 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.