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-02-22
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Amplifier
Downloaded: 3597 times
Not followed.
License: MIT license
EVC Click is a six-channel digital volume controller, equipped with an integrated electronic volume control circuit, which can be controlled over the I2C interface.
Do you want to subscribe in order to receive notifications regarding "EVC click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "EVC click" changes.
Do you want to report abuse regarding "EVC click".
Library Description
The library includes function sets the volume for the selected channel, uses two variables or one volume variable. The user has a function for mute/unmute sounds, default settings and function for clears all registers.
Key functions:
void equalizer_setVolumeFull(uint8_t channel, int8_t volume)
- Set volume for the channelvoid equalizer_defaultConfiguration()
- Default configurationvoid equalizer_mute(uint8_t mute)
- Mute and UnmuteExamples description
The application is composed of the three sections :
void applicationTask()
{
uint8_t dataReady_;
char receivedData_;
dataReady_ = UART_Rdy_Ptr( );
if (dataReady_ != 0)
{
receivedData_ = UART_Rd_Ptr( );
switch (receivedData_)
{
case 'z' :
{
/* Change channel */
_channel --;
if(_channel < 1)
{
_channel = 1;
}
_playFlag = 1;
break;
}
case 'x' :
{
/* Change channel */
_channel ++;
if(_channel > 6)
{
_channel = 6;
}
_playFlag = 1;
break;
}
case '+' :
{
/* Set volume */
_volume++;
if(_volume > 0)
{
_volume = 0;
}
_playFlag = 1;
break;
}
case '-' :
{
/* Set volume */
_volume--;
if(_volume < -79)
{
_volume = -79;
}
_playFlag = 1;
break;
}
case 'm' :
{
_mute();
break;
}
}
_play();
}
}
Additional Functions :
void _getCurrentChannel( )
- Return current channelvoid _play( )
- Start new settings of the channelvoid _mute( )
- mute and unmuteOther mikroE Libraries used in the example:
I2C
UART
Conversions
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.