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-11
Package Version: 1.0.0.1
mikroSDK Library: 1.0.0.0
Category: Amplifier
Downloaded: 5352 times
Not followed.
License: MIT license
2x5W AMP click functions as an amplifier and features the TDA7491LP 2x5-watt dual BTL class-D audio amplifier. The click is designed to run on either 3.3V or 5V power supply. It communicates with the target MCU over the following pins on the mikroBUSâ„¢ line: AN, RST, CS, PWM, INT.
Do you want to subscribe in order to receive notifications regarding "2x5W Amp click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "2x5W Amp click" changes.
Do you want to report abuse regarding "2x5W Amp click".
Library Description
The library covers all the necessary functions to control 2x5W Amp Click board. Library have drivers for setting one of three operating mode ( Standby, Mute or Play mode ) and for setting one of four amplifier gain ( 20dB, 26dB, 30dB or 32dB ) selection resistors.
Key functions:
uint8_t c2x5wamp_setMode( uint8_t selectMode )
- Set mode selection of the amplifier function.void c2x5wamp_play()
- Set Play mode of the amplifier function.void c2x5wamp_gain20dB()
- Set amplifier gain to 20dB function..Examples description
The application is composed of the three sections :
void applicationTask() { c2x5wamp_mute(); mikrobus_logWrite( " MUTE MODE ", _LOG_LINE ); Delay_ms( 5000 ); mikrobus_logWrite( "-----------------------", _LOG_LINE ); if ( c2x5wamp_setMode( _C2X5WAMP_MODE_PLAY ) ) { mikrobus_logWrite( " PLAY MODE ", _LOG_LINE ); } else { mikrobus_logWrite( " ERROR PLAY MODE ", _LOG_LINE ); } mikrobus_logWrite( "-----------------------", _LOG_LINE ); c2x5wamp_gain20dB(); mikrobus_logWrite( " Gain set to 20dB ", _LOG_LINE ); Delay_ms( 10000 ); mikrobus_logWrite( "- - - - - - - - - - - -", _LOG_LINE ); c2x5wamp_gain32dB(); mikrobus_logWrite( " Gain set to 32dB ", _LOG_LINE ); Delay_ms( 5000 ); mikrobus_logWrite( "-----------------------", _LOG_LINE ); }
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.