TOP Contributors

  1. MIKROE (2659 codes)
  2. Alcides Ramos (356 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 (137005 times)
  2. FAT32 Library (70124 times)
  3. Network Ethernet Library (56028 times)
  4. USB Device Library (46350 times)
  5. Network WiFi Library (41966 times)
  6. FT800 Library (41287 times)
  7. GSM click (29055 times)
  8. mikroSDK (26489 times)
  9. PID Library (26451 times)
  10. microSD click (25413 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: 3099 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

LCD Mono click

5

LCD Mono Click is a Click boardâ„¢ that uses the LS013B7DH03 LCD display from Sharp which combined with the EFM32, from Silicon Labs, and its energy saving capabilities creates a powerful display application.

[Learn More]

Nano Power 2 click

0

Nano Power 2 click is a very low power voltage comparator, aimed at portable and battery-powered applications. It allows detecting a difference of two voltage potentials, applied on two input pins.

[Learn More]

Current 4 click

0

Current 4 Click is a compact add-on board that provides a precise and accurate current sensing solution. This board features the INA250, a bidirectional, zero-drift current-shunt monitor from Texas Instruments.

[Learn More]