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 (137103 times)
  2. FAT32 Library (70236 times)
  3. Network Ethernet Library (56126 times)
  4. USB Device Library (46434 times)
  5. Network WiFi Library (42079 times)
  6. FT800 Library (41389 times)
  7. GSM click (29118 times)
  8. mikroSDK (26564 times)
  9. PID Library (26503 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: 1920 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

BLE 6 click

5

BLE 6 Click is a Bluetooth low energy system-on-chip application processor certified module, compliant with BT specifications v5.0 and BQE qualified. The featured BlueNRG-M2 module developed by STMicroelectronics supports multiple roles simultaneously and can act at the same time as Bluetooth master and slave device.

[Learn More]

Charger 27 click

0

Charger 27 Click is a compact add-on board that provides a single-cell charging solution. This board features the MP2639B, a Li-Ion or Li-Polymer switching charger from MPS. It is a highly integrated, flexible switch-mode battery charging management device for a single-cell battery for various portable applications. It uses a 4.5V up to 16V external input voltage to provide up to 2A of programmable charging current.

[Learn More]

Air Quality 7 click

0

Air quality 7 Click is a compact add-on board that combines state-of-the-art MOS sensor technology.

[Learn More]