UART Mux click
UART Mux click
Share
The UART Mux click is a Click board™ that switches the UART pins (RX and TX) from the mikroBUS™ to one of the four available outputs. It employs the SN74LV4052A, a Dual 4-Channel Multiplexer and Demultiplexer from Texas Instruments. It is designed for 2-V to 5.5-V VCC operation. Some of the typical applications for the SN74LV4052A include signal gating, chopping, modulation or demodulation (modem), and signal multiplexing for analog-to-digital and digital-to-analog conversion systems, which makes it ideal for multiplexing the UART pins from the mikroBUS™ to the multiple outputs.
The UART Mux 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.
HOW DOES IT WORK?
UART Mux click is equipped with the SN74LV4052A, a Dual 4-Channel Multiplexer and Demultiplexer, from Texas Instruments. Two control pins are used to switch to one of four available outputs, from a single UART input, from the mikroBUS™. Control pins labeled as A and B, are routed to the mikroBUS™ and can be operated by both 3.3V and 5V MCUs. The fourth control pin is labeled as EN pin, and it is used to enable the internal multiplexing switches of the IC, when is set to a HIGH logic level (it is active HIGH). A and B pins are routed to CS and PWM pins of the mikroBUS™ respectively. The active low Inhibit (INH) tri-state all the channels when high and when low, depending on the A and B inputs, one of the four independent input/outputs is connected to the UART communication pins. INH pin is routed to the RST pin on the mikroBUS™.
The ultra-low leakage current ensures that there is no signal interference from the inputs that are not selected by the A and B pins. A low crosstalk also ensures that the signal on one channel remains clean of interferences caused by other channels. This ensures a reliable operation of the IC and the Click board™ itself.
The output signals can be connected via the 2x4 pin headers. Besides RX and TX pins, every output also has dedicated VCC and GND pins avalilable, so that user can easily route multple devices with this Click board™. Independent power supply input allows the user to work with a wide range of signal amplitudes, depending on the application requirements, as long as the power supply stays within the limits.
More information about the SN74LV4052A can be found in the attached datasheet. However, the Click board™ comes equipped with a library that contains easy to use functions and a usage example that may be used as a reference for the development.
UART Mux click offers a selection between 3.3V and 5V operation, with the onboard SMD jumper, labeled as PWR SEL. This allows both 3.3V and 5V MCUs to be interfaced with this Click board™.
SPECIFICATIONS
Type | DAC |
Applications | Telecomunications, Infotainment, Signal Gating and Isolation, Home Appliances, Programmable Logic Circuits, Modulation and Demodulation |
On-board modules | SN74LV4052A, a Dual 4-Channel Analog Multiplexer and Demultiplexer from Texas Instruments |
Key Features | High On-Off Output-Voltage Ratio, Extremely Low Input Current, 2-V to 5.5-V VCC Operation |
Interface | GPIO,UART |
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 UART Mux 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 |
---|---|---|---|
PWR | PWR | - | Power LED Indicator |
J1 | VCC SEL | Left | Power supply voltage selection: left position 3.3V, right position 5V |
SOFTWARE SUPPORT
We provide a library for the UART Mux Click on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library covers all the necessary functions that enables the usage of the UART Mux click board. User can write, read or check if there is a new byte received on all four channels that are available. Library also offers the functions taht allow user to inhibit or uninhibit the communication.
Key functions:
-
void uartmux_writeByte(uint8_t input)
- Writes sinle byte -
uint8_t uartmux_readByte()
- Read received byte -
uint8_t uartmux_byteReady()
- Checks is there a new byte received
Examples description
The application is composed of three sections :
- System Initialization - Initializes UART, GPIO and LOG structures, sets RST, CS and PWM pins as output.
- Application Initialization - Initalizes UART driver, uninhibites communication and makes an initial log.
- Application Task - (code snippet) This example demonstrates the use of UART Mux click board by eather sending or receiving the message on channel one of the device.
void applicationTask() { char tmp; // RECEIVER - UART polling /* if ( 1 == uartmux_byteReadyChann1() ) { tmp = uartmux_readByteChann1(); mikrobus_logWrite( &tmp, _LOG_BYTE ); } */ // TRANSMITER - TX each 2 sec for (tmp = 0; tmp < 9; tmp++) { uartmux_writeByteChann1( MESSAGE_DATA[tmp] ); } Delay_ms(2000); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- UART
- Conversions
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. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
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.
Featured collection
-
Crazyflie 2.1+
Vendor:Regular price Rs. 26,499.00Regular priceUnit price / per -
Getting Started Bundle
Vendor:Regular price Rs. 26,399.00Regular priceUnit price / per -
Happy hacker bundle
Vendor:Regular price Rs. 33,599.00Regular priceUnit price / per -
STEM ranging bundle
Vendor:Regular price Rs. 43,999.00Regular priceUnit price / per -
Crazyradio 2.0
Vendor:Regular price Rs. 4,399.00Regular priceUnit price / per -
Lighthouse explorer bundle
Vendor:Regular price Rs. 89,999.00Regular priceUnit price / per -
Lighthouse positioning deck
Vendor:Regular price Rs. 9,899.00Regular priceUnit price / per -
Lighthouse V2 base station
Vendor:Regular price Rs. 30,349.00Regular priceUnit price / per -
Lighthouse swarm bundle
Vendor:Regular price Rs. 425,899.00Regular priceUnit price / per -
Loco explorer bundle
Vendor:Regular price Rs. 187,999.00Regular priceUnit price / per -
Loco positioning deck
Vendor:Regular price Rs. 9,899.00Regular priceUnit price / per -
Loco positioning node
Vendor:Regular price Rs. 18,699.00Regular priceUnit price / per -
Loco Swarm Bundle
Vendor:Regular price Rs. 529,609.00Regular priceUnit price / per -
Active marker deck
Vendor:Regular price Rs. 16,499.00Regular priceUnit price / per -
Motion capture marker deck
Vendor:Regular price Rs. 659.00Regular priceUnit price / per -
AI-Deck 1.1
Vendor:Regular price Rs. 27,999.00Regular priceUnit price / per -
AI-Deck Color Camera Module
Vendor:Regular price Rs. 2,199.00Regular priceUnit price / per -
AI-deck monocrome camera module
Vendor:Regular price Rs. 2,199.00Regular priceUnit price / per -
Flow deck v2
Vendor:Regular price Rs. 5,499.00Regular priceUnit price / per -
Crazyflie Bolt
Vendor:Regular price Rs. 21,999.00Regular priceUnit price / per -
Thrust upgrade bundle for Crazyflie 2.X
Vendor:Regular price Rs. 1,949.00Regular priceUnit price / perSold out -
Qi 1.2 wireless charging deck
Vendor:Regular price Rs. 3,849.00Regular priceUnit price / per -
7 mm DC-motor
Vendor:Regular price Rs. 439.00Regular priceUnit price / per -
Male long deck connector
Vendor:Regular price Rs. 219.00Regular priceUnit price / per -
250mAh LiPo battery
Vendor:Regular price Rs. 659.00Regular priceUnit price / per