AudioAmp 3 Click is a stereo audio amplifier, capable of delivering up to 79W per channel with the 4Ω load.
We provide a library for the AudioAmp3 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.
{
log_cfg_t log_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_printf( &logger, "--------------------------\r\n\n" );
log_printf( &logger, " Application Init\r\n" );
Delay_ms ( 100 );
log_printf( &logger, "--------------------------\r\n\n" );
log_printf( &logger, "--- AudioAmp 3 Click ---\r\n" );
log_printf( &logger, "--------------------------\r\n\n" );
Delay_ms ( 1000 );
log_printf( &logger, " Power Up \r\n" );
log_printf( &logger, " ---------------------------\r\n\n" );
Delay_100ms();
log_printf( &logger, " Set channel 1 low-low state \r\n" );
log_printf( &logger, " ---------------------------\r\n\n" );
Delay_100ms();
log_printf( &logger, " Set channel 2 low-low state \r\n" );
log_printf( &logger, " ---------------------------\r\n\n" );
Delay_100ms();
log_printf( &logger, " Mute All Channels \r\n" );
log_printf( &logger, " ---------------------------\r\n\n" );
Delay_100ms();
log_printf( &logger, " Run Diagnostics \r\n" );
log_printf( &logger, " ---------------------------\r\n\n" );
Delay_100ms();
log_printf( &logger, " Hardware Reset \r\n" );
log_printf( &logger, " ---------------------------\r\n\n" );
Delay_100ms();
log_printf( &logger, " Read Diagnostics \r\n" );
log_printf( &logger, " ---------------------------\r\n\n" );
Delay_100ms();
log_printf( &logger, "--------------------------\r\n\n" );
log_printf( &logger, " Initialization done \r\n" );
log_printf( &logger, "--------------------------\r\n\n" );
Delay_ms ( 1000 );
log_printf( &logger, " ---------------------------\r\n\n" );
log_printf( &logger, " Play \r\n" );
log_printf( &logger, " ---------------------------\r\n\n" );
Delay_100ms();
}
#define AUDIOAMP3_MAP_MIKROBUS(cfg, mikrobus)
Definition audioamp3.h:66
#define AUDIOAMP3_MASK_BIT_SEL_CH_1
Definition audioamp3.h:228
#define AUDIOAMP3_MASK_BIT_SEL_ALL_CH
Definition audioamp3.h:230
#define AUDIOAMP3_MASK_BIT_SEL_CH_2
Definition audioamp3.h:229
void audioamp3_read_all_diagnostics(audioamp3_t *ctx, uint8_t *p_all_diagnostics)
Read all diagnostics function.
void audioamp3_power_up(audioamp3_t *ctx)
Power Up function.
void audioamp3_cfg_setup(audioamp3_cfg_t *cfg)
Config Object Initialization function.
AUDIOAMP3_STATUS_T audioamp3_set_channel_low_to_low(audioamp3_t *ctx, uint8_t s_channel)
Set the channel to low-low state function.
AUDIOAMP3_STATUS_T audioamp3_set_channel_mute_mode(audioamp3_t *ctx, uint8_t s_channel)
Set the mute mode of channel function.
AUDIOAMP3_RETVAL audioamp3_init(audioamp3_t *ctx, audioamp3_cfg_t *cfg)
Initialization function.
AUDIOAMP3_STATUS_T audioamp3_set_play_mode(audioamp3_t *ctx)
Set the play mode for all channels function.
AUDIOAMP3_STATUS_T audioamp3_run_channel_diagnostics(audioamp3_t *ctx, uint8_t rc_channel)
Run channel diagnostics function.
void audioamp3_hw_reset(audioamp3_t *ctx)
Hardware reset function.
uint8_t data_out[10]
Definition main.c:30
void application_init(void)
Definition main.c:40
Click configuration structure definition.
Definition audioamp3.h:300
{
{
log_printf( &logger, " - Volume Up - \r\n" );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
}
log_printf( &logger, " ---------------------------\r\n\n" );
{
log_printf( &logger, " - Volume Down - \r\n" );
Delay_ms ( 1000 );
Delay_ms ( 1000 );
}
log_printf( &logger, " ---------------------------\r\n\n" );
}
#define AUDIOAMP3_GAIN_VAL_MIN
Definition audioamp3.h:247
#define AUDIOAMP3_GAIN_VAL_MAX
Definition audioamp3.h:245
#define AUDIOAMP3_GAIN_VAL_0
Definition audioamp3.h:248
#define AUDIOAMP3_GAIN_VAL_5
Definition audioamp3.h:249
AUDIOAMP3_STATUS_T audioamp3_set_gain_lvl(audioamp3_t *ctx, uint8_t gain_lvl)
Set the gain lvl function.
uint8_t cnt
Definition main.c:29
void application_task(void)
Definition main.c:117
uint8_t status_flag
Definition main.c:31
The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.