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 (136736 times)
  2. FAT32 Library (69950 times)
  3. Network Ethernet Library (55941 times)
  4. USB Device Library (46266 times)
  5. Network WiFi Library (41886 times)
  6. FT800 Library (41170 times)
  7. GSM click (28983 times)
  8. PID Library (26413 times)
  9. mikroSDK (26360 times)
  10. microSD click (25376 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

ATA6571 click

5

ATA6571 Click is a compact add-on board that contains a transceiver designed for high-speed CAN applications. This board features the ATA6571, a standalone high-speed CAN FD transceiver that interfaces a CAN protocol controller and the physical two-wire CAN bus from Microchip.

[Learn More]

HEXIWEAR Workstation - MP3 Player

0

Hexiwear Workstation MP3 demo application - play songs, change tracks with one simple click, turn up or bring down the volume. EnOcean 2 click was used as a controller. See the example below for a full list of used MikroElektronika products.

[Learn More]

Gyro 9 click

0

Gyro 9 Click is a compact add-on board that contains a high-performance gyroscope. This board features the A3G4250D, a MEMS motion sensor from STMicroelectronics. It is a low-power 3-axes digital output gyroscope that provides unprecedented stability at zero rate level and sensitivity over temperature and time and is equipped with an embedded temperature sensor. The gyroscope has a 16-bit rate value data output with an 8-bit compensation temperature data output.

[Learn More]