How does it work?
UART MUX 4 Click is based on the 74HC4066D, a quad single-pole, single-throw analog switch from Nexperia. The CMOS level inputs of the 74HC4066D include clamp diodes, which in turn allow the use of current limiting resistors to interface inputs to voltages exceeding VCC. This Click board™ has two multiplexed 4-pin UART headers labeled UART1 and UART2. The UART header lines are labeled for corresponding pins. It offers fast switching speeds with a turn-OFF time of 13ns and 11ns for turn-ON if powered with 5V.
The UART MUX 2 Click uses a standard UART interface to communicate with the host MCU, with commonly used RX and TX lines. To switch between the two output UART interfaces, this Click board™ features a switch in the form of an NPN transistor circuit. This switch circuit allows using one of the outputs UART interfaces via the SW pin of the mikroBUS™ socket with a simple logic state.
This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the VCC SEL jumper. This way, both 3.3V and 5V capable MCUs can 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.
Specifications
Type
Port expander,RS232
Applications
Can be used for the development of a wide range of applications, from industrial and instrumentation to consumer, communications, data-acquisition systems, and many more
On-board modules
74HC4066D – quad single-pole, single-throw analog switch from Nexperia
Key Features
Fast turn-ON and turn-OFF times, two output UART interfaces, 3.3V and 5V operation, clamp diodes included on inputs, CMOS level, ESD protection, and more
Interface
UART
Feature
ClickID
Compatibility
mikroBUS™
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on UART MUX 4 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 |
JP1 | VCC SEL | Left | Power/Logic Voltage Level Selection 3V3/5V: Left position 3V3, Right position 5V |
UART MUX 4 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | 5 | V |
Software Support
We provide a library for the UART MUX 4 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 UART MUX 4 Click driver.
Key functions
-
uartmux4_enable_uart1
UART MUX 4 enable the UART 1 function. -
uartmux4_enable_uart2
UART MUX 4 enable the UART 2 function.
Example Description
This example demonstrates the use of UART MUX 4 Click board™ by processing the incoming data and displaying them on the USB UART.
void application_task ( void )
{
if ( uartmux4_generic_write ( &uartmux4, DEMO_MESSAGE, sizeof( DEMO_MESSAGE ) ) )
{
if ( UARTMUX4_OK == uartmux4_process( &uartmux4 ) )
{
log_printf( &logger, "%s", app_buf );
uartmux4_clear_app_buf( );
}
}
Delay_ms( 2000 );
}
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:
- MikroSDK.Board
- MikroSDK.Log
- Click.UARTMUX4
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.
mikroSDK
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.