TOP Contributors

  1. MIKROE (2653 codes)
  2. Alcides Ramos (351 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 (136639 times)
  2. FAT32 Library (69851 times)
  3. Network Ethernet Library (55897 times)
  4. USB Device Library (46232 times)
  5. Network WiFi Library (41868 times)
  6. FT800 Library (41093 times)
  7. GSM click (28947 times)
  8. PID Library (26402 times)
  9. mikroSDK (26320 times)
  10. microSD click (25330 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 6 click

Rating:

5

Author: MIKROE

Last Updated: 2019-04-16

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Amplifier

Downloaded: 3027 times

Not followed.

License: MIT license  

Audio Amp 6 click is a mono/subwoofer audio amplifier, capable of delivering up to 18.5W per channel with the 4Ω load. It is based on the TPA3138D2, a class-D integrated amplifier, which utilizes a highly efficient switching scheme.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "AudioAmp 6 click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "AudioAmp 6 click" changes.

Do you want to report abuse regarding "AudioAmp 6 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

AudioAmp 6 click

AudioAmp 6 click

Native view of the AudioAmp 6 click board.

View full image
AudioAmp 6 click

AudioAmp 6 click

Front and back view of the AudioAmp 6 click board.

View full image

Library Description

Library contains all the necessary functions for control to the AudioAmp 6 click.

Key functions:

  • void audioamp6_setMode(uint8_t mode) - Sets MODE BD or 1SPW.
  • void audioamp6_setOutput(uint8_t out) - Enable or Disable output.
  • void audioamp6_setGain(uint8_t gain) - Sets Gain 20dB or 26dB.

Examples description

The application is composed of the three sections :

  • System Initialization - Sets the necessary gpio pins to control the click.
  • Application Initialization - Initializes the driver init and sets initial settings for the chip.
  • Application Task - Waits for valid user input and executes functions based on set of valid commands.

Note: Sets the input voltage from 3.5V to 14.4V. Use the UART to control the amplification or reduction of sound.

Commands : 'e' - Enable/disable output 'g' - Changes the gain settings (20dB - 26dB)

void applicationTask()
{
    uint8_t dataReady_;
    char receivedData_;

    dataReady_ = UART_Rdy_Ptr();

    if (dataReady_ != 0)
    {
        receivedData_ = UART_Rd_Ptr();

        switch (receivedData_)
        {
            case 'e' :
            {
                /* Device enable or disable */
                if(fEnable == _AUDIOAMP6_OUTPUT_ENABLE)
                {
                    audioamp6_setOutput(_AUDIOAMP6_OUTPUT_DISABLE);
                    mikrobus_logWrite("---- OUTPUT DISABLED ----", _LOG_LINE);
                    fEnable = _AUDIOAMP6_OUTPUT_DISABLE;
                }
                else
                {
                    audioamp6_setOutput(_AUDIOAMP6_OUTPUT_ENABLE);
                    mikrobus_logWrite("---- OUTPUT ENABLED ----", _LOG_LINE);
                    fEnable = _AUDIOAMP6_OUTPUT_ENABLE;
                }
                break;
            }
            case 'g' :
            {
                /* Gain 20dB or 26dB*/
                if(fGain == _AUDIOAMP6_GAIN_26dB)
                {
                    audioamp6_setGain(_AUDIOAMP6_GAIN_20dB);
                    mikrobus_logWrite("---- Gain [20 dB] ----", _LOG_LINE);
                    fGain = _AUDIOAMP6_GAIN_20dB;
                }
                else
                {
                    audioamp6_setGain(_AUDIOAMP6_GAIN_26dB);
                    mikrobus_logWrite("---- Gain [26 dB] ----", _LOG_LINE);
                    fGain = _AUDIOAMP6_GAIN_26dB;
                }
                break;
            }
        }
    }
}

Other mikroE Libraries used in the example:

  • GPIO
  • UART

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

Mikromedia+ for STM32 ARM - RF Communication Example

5

This is demonstration project how Mikromedia+ for STM communicate over RF. Data is send over simple 'led protocol' (1 byte command). Development board for STM32 with an add-on board nRF Click is used as a receiver device.

[Learn More]

DC Motor 11 click

5

DC Motor 11 Click is a brushed DC motor driver with the current limiting and current sensing. It is based on the DRV8830, an integrated H-Bridge driver IC, optimized for motor driving applications.

[Learn More]

LTE Cat.1-US click

5

LTE Cat.1-US click is a Click board based on Thales Cinterion ELS61 wireless module that delivers highly efficient Cat 1 LTE connectivity for M2M IoT solutions offering seamless fall back to 2G and 3G networks.

[Learn More]