TOP Contributors

  1. MIKROE (2663 codes)
  2. Alcides Ramos (358 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 (137081 times)
  2. FAT32 Library (70223 times)
  3. Network Ethernet Library (56094 times)
  4. USB Device Library (46413 times)
  5. Network WiFi Library (42032 times)
  6. FT800 Library (41377 times)
  7. GSM click (29109 times)
  8. mikroSDK (26555 times)
  9. PID Library (26487 times)
  10. microSD click (25486 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: 3136 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

EVC click

5

EVC Click is a six-channel digital volume controller, equipped with an integrated electronic volume control circuit, which can be controlled over the I2C interface.

[Learn More]

Joystick 2 click

5

Joystick 2 Click is a smart navigation key concept based on SKRHABE010 by Alps, a 4-direction joystick switch with Center-push Function. Alps switches, also known as microswitches, are well renowned for their reliability and endurance.

[Learn More]

RN4678 click

0

RN4678 click carries the RN4678 Bluetooth® 4.2 dual mode module from Microchip. The click is designed to run on a 3.3V power supply. It communicates with the target microcontroller over I2C and UART interface, with additional functionality provided by the following pins on the mikroBUS™ line: AN, RST, CS, PWM, INT.

[Learn More]