TOP Contributors

  1. MIKROE (2663 codes)
  2. Alcides Ramos (358 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (137099 times)
  2. FAT32 Library (70236 times)
  3. Network Ethernet Library (56124 times)
  4. USB Device Library (46434 times)
  5. Network WiFi Library (42077 times)
  6. FT800 Library (41387 times)
  7. GSM click (29116 times)
  8. mikroSDK (26562 times)
  9. PID Library (26489 times)
  10. microSD click (25487 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

Analog Mux click

Rating:

5

Author: MIKROE

Last Updated: 2020-05-13

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Port expander

Downloaded: 1901 times

Not followed.

License: MIT license  

Analog MUX click is a Click board that switches one of the sixteen inputs to one output. It employs the CD74HC4067, a High-Speed CMOS Logic 16-Channel Analog Multiplexer/Demultiplexer, produced by Texas Instruments.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Analog Mux click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Analog Mux click" changes.

Do you want to report abuse regarding "Analog Mux click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

Analog MUX click

Analog MUX click

Native view of the Analog MUX click board.

View full image
Analog MUX click

Analog MUX click

Front and back view of the Analog MUX click board.

View full image

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 voltage
  • void analogmux_set_channel ( uint8_t set_channel ); - Function used for set channel
  • void 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 );
}

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 clickUSB 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.

ALSO FROM THIS AUTHOR

LLC SPI click

6

The LLC SPI click is a very useful Click board which can be utilized as the level converter for logic signals. The topology of this logic level conversion (LLC) circuit is perfectly suited for SPI communication between devices with unmatched voltages of their logic signals.

[Learn More]

4Dot-Matrix R click

0

4Dot-Matrix R click is a display device Click board™, which contains a four-digit dot matrix display module, labeled as SLO2016.

[Learn More]

DIGI IN 2 click

0

DIGI IN 2 Click is a compact add-on board designed for converting high-voltage industrial signals into logic-level outputs, ideal for enhancing industrial control systems. This board features the MAX22196, a high-performance octal industrial sink/source digital input IC from Analog Devices. This Click board™ stands out for its ability to interface eight industrial inputs (8V-24V) via SPI, configurable as either sinking or sourcing with built-in current limiters, ensuring adherence to IEC 61131-2 standards.

[Learn More]