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 (137106 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 (41390 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

ADC 24 click

Rating:

0

Author: MIKROE

Last Updated: 2024-04-03

Package Version: 2.1.0.2

mikroSDK Library: 2.0.0.0

Category: ADC

Downloaded: 39 times

Not followed.

License: MIT license  

ADC 24 Click is a compact add-on board for high-speed analog to digital conversion. This board features the AD7490, a 12-bit, 16-channel successive approximation ADC from Analog Devices, optimized for efficient power usage with a consumption of just 2.5mA from a 5V supply while achieving up to 1MSPS throughput rates. The board features 16 single-ended analog inputs with a configurable input range, supported by a channel sequencer for sequential channel conversion and multiple operational modes for flexible power management. This makes ADC 24 Click ideal for extensive system monitoring applications such as multichannel system monitoring, power line monitoring, data acquisition, instrumentation, and process control, serving various industrial and tech applications.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "ADC 24 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "ADC 24 click" changes.

Do you want to report abuse regarding "ADC 24 click".

  • Information
  • Comments (0)

mikroSDK Library Blog


ADC 24 click

ADC 24 Click is a compact add-on board for high-speed analog to digital conversion. This board features the AD7490, a 12-bit, 16-channel successive approximation ADC from Analog Devices, optimized for efficient power usage with a consumption of just 2.5mA from a 5V supply while achieving up to 1MSPS throughput rates. The board features 16 single-ended analog inputs with a configurable input range, supported by a channel sequencer for sequential channel conversion and multiple operational modes for flexible power management. This makes ADC 24 Click ideal for extensive system monitoring applications such as multichannel system monitoring, power line monitoring, data acquisition, instrumentation, and process control, serving various industrial and tech applications.

adc24_click.png

click Product page


Click library

  • Author : Nenad Filipovic
  • Date : Dec 2023.
  • Type : SPI type

Software Support

We provide a library for the ADC 24 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.

Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Library Description

This library contains API for ADC 24 Click driver.

Standard key functions :

  • adc24_cfg_setup Config Object Initialization function.

    void adc24_cfg_setup ( adc24_cfg_t *cfg );
  • adc24_init Initialization function.

    err_t adc24_init ( adc24_t *ctx, adc24_cfg_t *cfg );

Example key functions :

  • adc24_get_voltage This function reads the results of 12-bit ADC raw data and converts them to proportional voltage levels by using the SPI serial interface.

    err_t adc24_get_voltage ( adc24_t *ctx, adc24_ctrl_t ctrl, uint8_t *in_pos, float *voltage );
  • adc24_get_adc_data This function reads a conversion result and selected channel by using the SPI serial interface.

    err_t adc24_get_adc_data ( adc24_t *ctx, adc24_ctrl_t ctrl, uint8_t *in_pos, uint16_t *adc_data );

Example Description

This example demonstrates the use of the ADC 24 Click board by reading and writing data by using the SPI serial interface and reading results of AD conversion.

The demo application is composed of two sections :

Application Init

Initialization of SPI module and log UART.

void application_init ( void )
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    adc24_cfg_t adc24_cfg;  /**< Click config object. */

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_info( &logger, " Application Init " );

    // Click initialization.
    adc24_cfg_setup( &adc24_cfg );
    ADC24_MAP_MIKROBUS( adc24_cfg, MIKROBUS_1 );
    if ( SPI_MASTER_ERROR == adc24_init( &adc24, &adc24_cfg ) )
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    ctrl.ch_sel = ADC24_CH_SEL_IN_0;
    ctrl.pm = ADC24_PM_NORMAL;
    ctrl.seq_shadow = ADC24_SEQ_SHADOW_AN_INPUT;
    ctrl.weak = ADC24_WEAK_DOUT_THREE_STATE;
    ctrl.range = ADC24_RANGE_VREF_5V;
    ctrl.coding = ADC24_CODING_BIN;

    log_info( &logger, " Application Task " );
    log_printf( &logger, "_____________\r\n" );
}

Application Task

The demo application reads the voltage levels from all 15 analog input channels and displays the results. Results are being sent to the UART Terminal, where you can track their changes.

void application_task ( void )
{
    uint8_t ch_pos = 0;
    float voltage = 0;
    for ( uint8_t n_cnt = ADC24_CH_SEL_IN_0; n_cnt <= ADC24_CH_SEL_IN_15; n_cnt++ )
    {
        ctrl.ch_sel = n_cnt;
        if ( ADC24_OK == adc24_get_voltage( &adc24, ctrl, &ch_pos, &voltage ) )
        {
            log_printf( &logger, " IN%u : %.3f V\r\n", ( uint16_t ) ch_pos, voltage );
        }
        Delay_ms ( 100 );  
    }
    log_printf( &logger, "_____________\r\n" );
    Delay_ms ( 1000 );
}

The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Other Mikroe Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.ADC24

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 MikroElektronika compilers.


ALSO FROM THIS AUTHOR

Analog MUX click

0

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.

[Learn More]

8x8 R click

0

8x8 R click is a 64 LED matrix display Click board™, composed of SMD LEDs organized in 8 rows by 8 columns. It has a digital brightness control in 16 steps, it can control every LED in the display matrix independently, it blanks the display on power up to eliminate glitches and it requires a single resistor to control the current through all the LEDs at once, which simplifies the design. 8x8 R click uses a fast SPI communication protocol, allowing fast display response and no lag.8x8 R Click is an add-on board in mikroBUS form factor.

[Learn More]

Air quality 9 click

0

Air quality 9 Click is a compact add-on board containing a best-in-class air-quality sensing solution. This board features the ENS160, a digital multi-gas sensor solution based on metal oxide (MOX) technology with four MOx sensor elements from ScioSense. Each sensor element has independent hotplate control to detect a wide range of gases. The ENS160 series features TrueVOCâ„¢ air quality detection and supports intelligent algorithms, which calculate CO2 equivalents, TVOC, air quality index (AQI), and perform humidity and temperature compensation. This Click boardâ„¢ is interface-configurable and characterized by outstanding long-term stability and lifetime.

[Learn More]