TOP Contributors

  1. MIKROE (2653 codes)
  2. Alcides Ramos (352 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 (136726 times)
  2. FAT32 Library (69944 times)
  3. Network Ethernet Library (55941 times)
  4. USB Device Library (46265 times)
  5. Network WiFi Library (41886 times)
  6. FT800 Library (41169 times)
  7. GSM click (28983 times)
  8. PID Library (26412 times)
  9. mikroSDK (26358 times)
  10. microSD click (25369 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: 3037 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

9DOF 2 click

0

9DOF 2 Click is a compact add-on board for applications which require lowest power motion tracking and magnetometer functionality.

[Learn More]

ADC 2 click

5

ADC 2 click carries MCP3551/3, which is a 22-bit ADC with automatic internal offset and gain calibration. This high precision analog-to-digital converter has total unadjusted error of less than 10 ppm, and low-output noise of 2.5 µV RMS. ADC 2 click communicates with the target board through mikroBUS CS, CSK and MISO lines.

[Learn More]

Magneto 7 click

5

Magneto 7 Click is a high-resolution magnetic sensor Click board which allows contactless orientation sensing.

[Learn More]