How does it work?
MUX 5 Click is based on the MAX14661, a serially controlled, dual-channel analog multiplexer from Analog Devices. It allows any of the 16 pins to be connected to any of the common pins, routed to the AN or INT pins of the mikroBUS™ socket, simultaneously in any combination. The MAX14661 features Beyond-the-Rails™ capability, which mainly simplifies an analog design by eliminating the need for multiple power rails and allows ±5.5V signals to be passed with any supply configuration. It integrates bias circuitry to switch high-voltage (±25V) signals while operating from a low-voltage supply with low on-resistance and fast bandwidth speeds. This Click board™ is ideal for audio and data multiplexing, interface termination, switching, industrial measurement, and instrumentation systems.
The MAX14661 allows for the use of both I2C and SPI interfaces. Both modes provide individual control of each independent switch so that any combination of switches can be applied. The selection can be made by positioning SMD jumpers labeled as COMM SEL in an appropriate position. Note that all the jumpers’ positions must be on the same side, or the Click board™ may become unresponsive. While the I2C interface is selected, the MAX14661 allows choosing the least significant bit (LSB) of its I2C slave address using the SMD jumper labeled ADDR SEL.
This Click board™ also possesses an additional active-low shutdown pin, routed to the RST pin on the mikroBUS™ socket. When this pin is set to a low logic state, all registers are cleared, all switches are open, and the serial interface is not functional.
NOTE: The MAX14661 consumes minimal power in this mode.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the VCC SEL jumper. This way, it is allowed for both 3.3V and 5V capable MCUs to 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
DAC
Applications
Can be used for various multiplexing applications like system diagnostics, data acquisition, signal switching, and many more
On-board modules
MAX14661 – analog multiplexer from Analog Devices
Key Features
Serially controlled, dual-channel, Beyond-the-Rails capability, selectable interface, low power consumption, high performance, flexible multiplexing, programmable shadow registers allow simultaneous updating, and more
Interface
I2C,SPI
Feature
ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on MUX 5 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 | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
JP2-JP6 | COMM SEL | Right | Communication Interface Selection SPI/I2C: Left position SPI, Right position I2C |
JP7 | ADDR SEL | Left | I2C Address Selection 0/1: Left position 0, Right position 1 |
J1-J2 | – | Populated | MUX Channels Header |
MUX 5 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
Analog Signal Range | -5.5 | – | 5.5 | V |
Software Support
We provide a library for the MUX 5 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 MUX 5 Click driver.
Key functions
-
mux5_i2c_write_register
This function writes a desired data to the selected register by using I2C serial interface. -
mux5_i2c_read_register
This function reads data from the selected register by using I2C serial interface. -
mux5_set_channels_state
This function sets a desired @b ch_state of the channels selected with @b ch_mask.
Example Description
This example demonstrates the use of MUX 5 click board by mapping the common connection A and B to different channels every 5 seconds.
void application_task ( void )
{
static uint8_t ch_num = 0;
if ( MUX5_OK == mux5_set_channels_state ( &mux5, MUX5_CHANNEL_ALL, MUX5_CHANNEL_STATE_HIGH_Z ) )
{
log_printf ( &logger, " All channels disconnectedrn" );
}
Delay_ms ( 1000 );
if ( MUX5_OK == mux5_set_channels_state ( &mux5, MUX5_CHANNEL_1 << ch_num, MUX5_CHANNEL_STATE_COM_A ) )
{
log_printf ( &logger, " Channel %u connected to COM_Arn", ( uint16_t ) ( ch_num + 1 ) );
}
if ( MUX5_OK == mux5_set_channels_state ( &mux5, MUX5_CHANNEL_16 >> ch_num, MUX5_CHANNEL_STATE_COM_B ) )
{
log_printf ( &logger, " Channel %u connected to COM_Brnn", ( uint16_t ) ( 16 - ch_num ) );
}
if ( ++ch_num >= 16 )
{
ch_num = 0;
}
Delay_ms ( 4000 );
}
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.MUX5
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.