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]
Rating:
Author: MIKROE
Last Updated: 2020-01-03
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Amplifier
Downloaded: 3110 times
Not followed.
License: MIT license
AudioAmp 3 Click is a stereo audio amplifier, capable of delivering up to 79W per channel with the 4Ω load. It is based on the TAS5414, a class-D integrated amplifier, which utilizes a highly efficient switching scheme.
Do you want to subscribe in order to receive notifications regarding "AudioAmp 3 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "AudioAmp 3 click" changes.
Do you want to report abuse regarding "AudioAmp 3 click".
Library Description
The library covers all the necessary functions to control AudioAmp 3 click board. A library performs a standard I2C interface communication.
Key functions:
AUDIOAMP3_STATUS_T audioamp3_setGainLvl( uint8_t gainLvl )
- Set the gain lvl function.AUDIOAMP3_STATUS_T audioamp3_setChannelMuteMode( uint8_t sChannel )
- Set the mute mode of channel function.AUDIOAMP3_STATUS_T audioamp3_setPlayMode()
- Set the play mode for all channels function.Examples description
The application is composed of three sections :
void applicationTask()
{
char receivedData;
if ( UART_Rdy_Ptr() )
{
receivedData = UART_Rd_Ptr();
switch ( receivedData )
{
case '+' :
{
for( cnt = _AUDIOAMP3_MIN_GAIN; cnt < _AUDIOAMP3_GAIN_5; cnt++ )
{
statusFlag = audioamp3_setGainLvl( cnt );
mikrobus_logWrite( " - Volume Up -", _LOG_LINE );
Delay_1sec();
}
mikrobus_logWrite( "---------------------", _LOG_LINE );
break;
}
case '-' :
{
for( cnt = _AUDIOAMP3_MAX_GAIN; cnt > _AUDIOAMP3_GAIN_0; cnt-- )
{
statusFlag = audioamp3_setGainLvl( cnt );
mikrobus_logWrite( " - Volume Down -", _LOG_LINE );
Delay_1sec();
}
mikrobus_logWrite( "---------------------", _LOG_LINE );
break;
}
case '=' :
{
audioamp3_setGainLvl( _AUDIOAMP3_MEDIUM_GAIN );
mikrobus_logWrite( " - Medium Vol. -", _LOG_LINE );
mikrobus_logWrite( "---------------------", _LOG_LINE );
break;
}
case 'M' :
{
audioamp3_setChannelMuteMode( _AUDIOAMP3_SELECT_ALL_CHANNELS );
mikrobus_logWrite( " Mute All Channel ", _LOG_LINE );
mikrobus_logWrite( "--------------------", _LOG_LINE );
break;
}
case 'P' :
{
audioamp3_setPlayMode();
mikrobus_logWrite( " Play ", _LOG_LINE );
mikrobus_logWrite( "--------------------", _LOG_LINE );
break;
}
}
}
}
Other mikroE Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB 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.