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: 2019-01-31
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Amplifier
Downloaded: 3933 times
Not followed.
License: MIT license
AudioAmp 4 click is a low-power audio amplifier with a digital volume control. It is equipped with the LM4860, an audio amplifier IC capable of delivering up to 1W of continuous power to an 8 Ω load.
Do you want to subscribe in order to receive notifications regarding "AudioAmp 4 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "AudioAmp 4 click" changes.
Do you want to report abuse regarding "AudioAmp 4 click".
Library Description
The library performs a audio control and works as audio amplifier. Possible commands are to turn ON or OFF the output (speaker) and to set the output volume by selecting the desired channel. For more details check documentation.
Key functions:
T_AUDIOAMP4_RETVAL audioamp4_setChannel( uint8_t channel )
- Function performs a volume channel selection.T_AUDIOAMP4_RETVAL audioamp4_shutdown( uint8_t state )
- Function turns shutdown to ON or OFF state.Examples description
The application is composed of the three sections :
void applicationTask()
{
rxDat = UART_Rdy_Ptr();
if (rxDat != _NO_RECEIVED_DATA)
{
rxDat = UART_Rd_Ptr();
if (rxDat == '+')
{
audioamp4_shutdown( _AUDIOAMP4_SHUTDOWN_OFF );
mikrobus_logWrite( "* Shutdown OFF *", _LOG_LINE );
}
else if (rxDat == '-')
{
audioamp4_shutdown( _AUDIOAMP4_SHUTDOWN_ON );
mikrobus_logWrite( "* Shutdown ON *", _LOG_LINE );
}
else if (rxDat == 'l')
{
writeLegend();
}
else
{
channSel = rxDat - '0';
responseCheck = audioamp4_setChannel( channSel );
checkResponse();
}
}
}
Additional Functions :
Other mikroE Libraries used in the example:
UART
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 clickor 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.