How does it work?
Analog MUX click is equipped with the CD74HC4067, a high-speed CMOS logic 16-channel analog multiplexer/demultiplexer, produced by Texas Instruments. It supports 3.3V and 5V power supplies, as well as rail to rail operation, which allows it to be used in a very wide range of different applications. Four control pins are used to switch one of sixteen inputs to a single output. Control pins labeled as S0, S1, S2, and S3 are routed to the mikroBUS™ and can be operated by both 3.3V and 5V MCUs. These pins are routed to RST, PWM, INT, and CS pins of the mikroBUS™ respectively, while the common output pin from the multiplexer is routed to the AN pin on the mikroBUS™.
The CD74HC4067 IC is digitally controlled analog switch that utilize silicon-gate CMOS technology to achieve operating speeds similar to LSTTL, with the low power consumption of standard CMOS integrated circuits. The mentioned analog multiplexer/demultiplexer control analog voltages that may vary across the voltage supply range.
The ultra-low leakage current ensures that there is no signal interference from the inputs that are not selected by the S0, S1, S2, and S3 pins. A low crosstalk also ensures that the signal on one channel remains clean of interferences caused by other channels. To prevent any two inputs to be switched at the output at the same time, a break-before-make switching action is utilized. This ensures a reliable operation of the IC and the Click board™ itself. Analog MUX click is bidirectional switch as well, thus allowing any analog input to be used as an output and vice-versa. The switches have low “on” resistance and low “off” leakages.
All of the input channels can be easily connected to the two 9 pole spring action block terminals, without having to use any additional tools, such as screwdrivers.
More information about the CD74HC4067 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.
Analog 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
Measurements,Port expander
Applications
Automatization and process control, programmable logic controllers, digital multimeters, battery monitoring, and other applications that require analog signal switching.
On-board modules
CD74HC4067, a high-speed CMOS logic 16-channel analog multiplexer/demultiplexer, produced by Texas Instruments.
Key Features
low on-resistance and low input current leakage, fast and balanced propagation delay and transition times, break-before-make switching action
Interface
GPIO
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 Analog 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 |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
JP1 | VCC SEL | Left | Power Supply Voltage Selection 3V3/5V, left position 3v3, right position 5v |
TB1, TB2 | – | – | Input 9 pole spring action terminals |
Analog MUX Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
VCC | 2 | 3.3 | 6 | V |
“ON” Resistance | 70 | Ω | ||
Input Rise and Fall Time | 500 | ns |
Software Support
We provide a library for the Analog 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
This library allows user to perform a control of the Analog MUX Click board. Also user can check the indication status from the charger to get charging state. Fault condition also can be checked. For more details check documentation.
Key functions:
float analogmux_get_voltage ( float adc_value );
– Function used for get voltagevoid analogmux_set_channel ( uint8_t set_channel );
– Function used for set channelvoid analogmux_set_adc_vref ( uint16_t vref_mV );
– Function used for set vref in millivolts
Examples description
The application is composed of three sections :
- System Initialization – Initializes ADC module
- Application Initialization – Initializes driver and adc, and set vref and channel.
- Application Task – (code snippet) – Measures adc_value and voltage every 2 sec on set channel.
void application_task ( ) { uint8_t cnt = 0; float voltage = 0; float average_f = 0.0; volatile uint32_t average_value = 0; char demo_text[ 50 ]; for( cnt = 0; cnt < 10; cnt++ ) { average_value += analogmux_adc_read( ); } average_f = average_value / 10.0; FloatToStr( average_f, demo_text ); mikrobus_logWrite( " ADC value: ", _LOG_TEXT ); mikrobus_logWrite( demo_text, _LOG_LINE ); voltage = analogmux_get_voltage( average_f ); FloatToStr( voltage, demo_text ); mikrobus_logWrite( " Voltage: ", _LOG_TEXT ); mikrobus_logWrite( demo_text, _LOG_LINE ); Delay_ms( 2000 ); mikrobus_logWrite( " <<< ------------------------ >>> ", _LOG_LINE ); }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- ADC
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.