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: 2018-07-03
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Amplifier
Downloaded: 4235 times
Not followed.
License: MIT license
Audio Amp 2 click is a highly efficient class D audio amplifier, using the TDA7491, a dual BTL class-D audio amplifier IC, capable of delivering up to 20W to 8Ω load.
Do you want to subscribe in order to receive notifications regarding "AudioAmp 2 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "AudioAmp 2 click" changes.
Do you want to report abuse regarding "AudioAmp 2 click".
Library Description
Library offers a choice to put the device in desired mode (Standby, Mute or Play Mode) and to select the gain to the desired value (20, 26, 30 or 32dB).
For more details check the documentation.
Key functions :
uint8_t audioamp2_setMode( uint8_t selMode )
- Function puts device in desired mode.uint8_t audioamp2_setGain( uint8_t selGain )
- Function performs the gain selection.uint8_t audioamp2_checkDiagnostic( void )
- Function checks isundervoltage, overcurrent or thermal protection activated.Example description
The application is composed of three sections :
System Initialization - Initializes peripherals and pins.
Application Initialization - Initializes GPIO driver and puts the device in Standby Mode as default
operation mode and selects 20dB as default gain selection.
Application Task - (code snippet) - Activates Mute operation mode for 4 seconds and after that activates Play mode.
When the device is in Play mode then changes the gain selection, first sets the minimum gain (20dB) for 8 seconds and then sets the maximum gain (32dB) for 8 seconds too.
Note: Internally, the gain is set by changing the feedback resistors of the amplifier.
void applicationTask()
{
audioamp2_setMode( _AUDIOAMP2_MUTE_MODE );
Delay_ms( 4000 );
audioamp2_setGain( _AUDIOAMP2_20DB_GAIN );
audioamp2_setMode( _AUDIOAMP2_PLAY_MODE );
Delay_ms( 8000 );
audioamp2_setGain( _AUDIOAMP2_32DB_GAIN );
Delay_ms( 8000 );
}
Other mikroE Libraries used in the example:
Additional notes and information
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.