TOP Contributors

  1. MIKROE (2780 codes)
  2. Alcides Ramos (376 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (97 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 (139571 times)
  2. FAT32 Library (72041 times)
  3. Network Ethernet Library (57259 times)
  4. USB Device Library (47631 times)
  5. Network WiFi Library (43229 times)
  6. FT800 Library (42566 times)
  7. GSM click (29932 times)
  8. mikroSDK (28294 times)
  9. PID Library (26934 times)
  10. microSD click (26309 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

AudioAMP 11 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.9

mikroSDK Library: 2.0.0.0

Category: Amplifier

Downloaded: 109 times

Not followed.

License: MIT license  

AudioAmp 11 Click is a compact add-on board reproducing input audio signals with desired volume and power levels at sound-producing output elements. This board features the NAU8224, a high-performance stereo Class-D audio amplifier from Nuvoton Technology. This flexible I2C configurable audio amplifier can drive a 4O load with up to 3.1W output power. In addition to the possibility of digital control (using only one enable pin), the NAU8224 also has many useful gain settings from 6dB to 24dB. Besides, it is equipped with protection features, allowing a reliable operation.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "AudioAMP 11 Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "AudioAMP 11 Click" changes.

Do you want to report abuse regarding "AudioAMP 11 Click".

  • Information
  • Comments (0)

mikroSDK Library Blog


AudioAMP 11 Click

AudioAmp 11 Click is a compact add-on board reproducing input audio signals with desired volume and power levels at sound-producing output elements. This board features the NAU8224, a high-performance stereo Class-D audio amplifier from Nuvoton Technology. This flexible I2C configurable audio amplifier can drive a 4Ω load with up to 3.1W output power. In addition to the possibility of digital control (using only one enable pin), the NAU8224 also has many useful gain settings from 6dB to 24dB. Besides, it is equipped with protection features, allowing a reliable operation.

audioamp11_click.png

Click Product page


Click library

  • Author : Nenad Filipovic
  • Date : Jan 2023.
  • Type : I2C type

Software Support

We provide a library for the AudioAMP 11 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 AudioAMP 11 Click driver.

Standard key functions :

  • audioamp11_cfg_setup Config Object Initialization function.

    void audioamp11_cfg_setup ( audioamp11_cfg_t *cfg );
  • audioamp11_init Initialization function.

    err_t audioamp11_init ( audioamp11_t *ctx, audioamp11_cfg_t *cfg );
  • audioamp11_default_cfg Click Default Configuration function.

    err_t audioamp11_default_cfg ( audioamp11_t *ctx );

Example key functions :

  • audioamp11_enable_device AudioAMP 11 enable device function.

    void audioamp11_enable_device ( audioamp11_t *ctx );
  • audioamp11_check_gain AudioAMP 11 check gain function.

    err_t audioamp11_check_gain ( audioamp11_t *ctx, uint8_t *gain );
  • audioamp11_set_output_volume_level AudioAMP 11 set output volume level function.

    err_t audioamp11_set_output_volume_level ( audioamp11_t *ctx, uint8_t volume_data );

Example Description

This library contains API for the AudioAMP 11 Click driver. This demo application shows use of a AudioAMP 11 Click board™.

The demo application is composed of two sections :

Application Init

Initialization of I2C module and log UART. After driver initialization the app set default settings, performs power-up sequence, sets the volume level to 0.

void application_init ( void ) 
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    audioamp11_cfg_t audioamp11_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.
    audioamp11_cfg_setup( &audioamp11_cfg );
    AUDIOAMP11_MAP_MIKROBUS( audioamp11_cfg, MIKROBUS_1 );
    if ( I2C_MASTER_ERROR == audioamp11_init( &audioamp11, &audioamp11_cfg ) ) 
    {
        log_error( &logger, " Communication init." );
        for ( ; ; );
    }

    if ( AUDIOAMP11_ERROR == audioamp11_default_cfg ( &audioamp11 ) )
    {
        log_error( &logger, " Default configuration." );
        for ( ; ; );
    }

    log_info( &logger, " Application Task " );
    log_printf( &logger, "----------------------\r\n" );
    Delay_ms ( 100 );
}

Application Task

This example demonstrates the use of the AudioAMP 11 Click board™. If GAIN SEL switches are set to 12dB, the app performs circles switching the volume from -20.5 dB to 12 dB. If the GAIN SEL switches are different, the app sets the volume level to 31 (maximum). Results are being sent to the UART Terminal, where you can track their changes.

void application_task ( void ) 
{
    uint8_t gain_level = 0;
    uint8_t volume_level = 0;

    audioamp11_check_gain( &audioamp11, &gain_level );
    log_printf( &logger, " Gain set to %d dB\r\n", AUDIOAMP11_CALC_GAIN_CONFIG( gain_level ) );

    if ( AUDIOAMP11_GAINDEC_12dB == gain_level )
    {
        float volume_table[ 32 ] = { OUTPUT_VOLUME_12dB };
        audioamp11_set_output_volume_level( &audioamp11, vol_ctrl );
        Delay_ms ( 100 );

        if ( vol_ctrl > AUDIOAMP11_GS_12dB_VOLCTRL_12dB )
        {
            vol_ctrl--;
        }
        else
        {
            vol_ctrl = AUDIOAMP11_GS_12dB_VOLCTRL_m20_5dB;
        }

        audioamp11_get_output_volume_level( &audioamp11, &volume_level );
        log_printf( &logger, " Volume set to  %.1f dB\r\n", volume_table[ volume_level ] );
    }
    else
    {
        audioamp11_set_output_volume_level( &audioamp11, AUDIOAMP11_VOLUME_LEVEL_31 );
        audioamp11_get_output_volume_level( &audioamp11, &volume_level );        
    }

    log_printf( &logger, " Volume Level %d: ", ( uint16_t ) ( AUDIOAMP11_VOLUME_LEVEL_0 - volume_level ) );
    for ( uint8_t n_cnt = 0; n_cnt < ( AUDIOAMP11_VOLUME_LEVEL_0 - volume_level ); n_cnt++ )
    {
        log_printf( &logger, "|" );    
    }
    log_printf( &logger, "\r\n----------------------\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.AudioAMP11

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

6DOF IMU 17 Click

0

6DOF IMU 17 Click is a compact add-on board that contains a 6-axis inertial measurement unit. This board features the IIM-42652, a 6-axis SmartIndustrial™ MotionTracking device that supports an extended operating temperature range for industrial applications from TDK InvenSense. It combines a 3-axis gyroscope and a 3-axis accelerometer featuring a 2K-byte FIFO that can lower the traffic on the serial bus interface (SPI or I2C) and reduce power consumption by allowing the system processor to burst read sensor data and then go into a low-power mode.

[Learn More]

UWB 4 Click

0

UWB 4 Click is a compact add-on board for precise indoor positioning and location-based applications. This board features the Sera NX040 (453-00174C) from Ezurio, featuring NXP's SR040 chipset for ultra-wideband (UWB) and Nordic Semiconductor's nRF52833 for Bluetooth LE. The module supports IEEE 802.15.4/4z HPR UWB operations, providing exceptional ranging accuracy of less than ±10 cm with a typical receiver sensitivity of -92 dBm.

[Learn More]

TouchPad 2 Click

0

Touchpad 2 Click is a compact add-on board that easily integrates projected capacitive touch into their applications. This board features the IQS525, a projected capacitive touch and proximity trackpad/touchscreen controller from Azoteq. It features best in class sensitivity, signal-to-noise ratio, and automatic tuning of electrodes, in addition to the multi-touch and multi-hover feature. This Click board™ is characterized by embedded gesture engine recognition for simple gestures (tap, swipes, hold), as well as built-in noise detection and filtering. This Click board™ is suitable for human-machine interfaces, keypad or scrolling functions, single-finger gesture-based interfaces, and more.

[Learn More]