TOP Contributors

  1. MIKROE (2650 codes)
  2. Alcides Ramos (350 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 (136556 times)
  2. FAT32 Library (69760 times)
  3. Network Ethernet Library (55856 times)
  4. USB Device Library (46198 times)
  5. Network WiFi Library (41818 times)
  6. FT800 Library (41023 times)
  7. GSM click (28933 times)
  8. PID Library (26386 times)
  9. mikroSDK (26297 times)
  10. microSD click (25307 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: 1853 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

V to Hz click

0

V to HZ click is a device that converts an analog voltage input signal into a pulse wave signal of a certain frequency. It has a linear response, so applying a voltage in a range of 0 to 5V on its input, will result in generating the pulse train with frequency linearly proportional to the input voltage.

[Learn More]

SPI Isolator click

0

The click is designed to run on either 3.3V or 5V power supply. It communicates with the target microcontroller over SPI interface.

[Learn More]

LightHz click

0

LightHz Click is a compact add-on board that effectively measures ambient light intensity. This board features the TL2L30BR, a programmable light-to-frequency converter from ams. The sensor outputs either a pulse train or a square wave (50% duty cycle) with a frequency directly proportional to light intensity (irradiance). It has programmable sensitivity and full-scale output frequency and could be used as a rough color detector with a selectable frequency range.

[Learn More]