Intermediate
30 min
0

Redefine audio quality and deliver the best sonic experience by combining V1000 and STM32F107VC

Revolutionizing your sound: Unleash the power of ultimate audio with our multi-effects DSP!

DSP Click with UNI Clicker

Published Oct 22, 2023

Click board™

DSP Click

Development board

UNI Clicker

Compiler

NECTO Studio

MCU

STM32F107VC

Dive into the future of audio with our multi-effects DSP, providing an unmatched audio journey that exceeds all expectations

A

A

Hardware Overview

How does it work?

DSP Click is based on the V1000, a complete multi-effects audio DSP with ultra-high quality audio performance in a rapid ‘time-to-market’ solution from Coolaudio. The V1000 is a specialized microprocessor chip with its architecture optimized for the needs of digital signal processing. It includes serially programmable SRAM for program development and integrated RAM with 16 built-in effects such as multiple reverbs, echo, phaser, chorus, flanger, and more. Alongside the 16 internal programs, programmable SRAM is easily accessible through the I2C serial interface by setting the V1000 to external mode, while in internal mode, the four GPIO pins (P0-P3) may be used to select the different algorithms. Combined with a low-cost codec like the V4220 from Coolaudio, this Click board™ provides an ultra-low-cost FX solution. The V4220 is a high-performance 24-bit audio codec providing stereo A/D and D/A converters using the

latest conversion technology. It operates from a single +5V power supply, features low power consumption, and a selectable de-emphasis filter for 32, 44.1, and 48kHz sample rates. It also includes an analog volume control architecture that can make a 113.5dB attenuation in 0.5dB steps, preserving dynamic range during attenuation. The V4220 provides a serial interface to read/write the internal registers operating in either Master or Slave Mode. This audio player consists of two analog channels, input and output routed to the 3.5mm audio jack connectors. The functional configuration of these audio channels consists of two dual audio operational amplifiers, the RC4580 from Texas Instruments, used as headphone amplifiers. It offers low noise, high gain-bandwidth, low harmonic distortion, and high output current, powered by ±15V obtained by the TPS65131, dual-output DC-DC converter generating a positive output voltage up to 15V and

a negative output voltage down to –15V with output currents in a 200mA range from Texas Instruments. Also, this Click board™ can be reset through the Hardware Reset pin, labeled as RST on the mikroBUS™ socket, and has two jumpers on its bottom side labeled as JP1 and JP2, which very easily adjusts the way the V1000 communicates with the MCU, between I2C communication or IO pins, by positioning SMD jumpers to an appropriate position. Note that all jumpers must be placed on the same side, or the Click board™ may become unresponsive. This Click board™ can be operated only with a 5V logic voltage level. The board must perform appropriate logic voltage level conversion before using MCUs with different logic levels. Also, it comes equipped with a library containing functions and an example code that can be used as a reference for further development.

DSP Click top side image
DSP Click bottom side image

Features overview

Development board

UNI Clicker is a compact development board designed as a complete solution that brings the flexibility of add-on Click boards™ to your favorite microcontroller, making it a perfect starter kit for implementing your ideas. It supports a wide range of microcontrollers, such as different ARM, PIC32, dsPIC, PIC, and AVR from various vendors like Microchip, ST, NXP, and TI (regardless of their number of pins), four mikroBUS™ sockets for Click board™ connectivity, a USB connector, LED indicators, buttons, a debugger/programmer connector, and two 26-pin headers for interfacing with external electronics. Thanks to innovative manufacturing technology, it allows you to build

gadgets with unique functionalities and features quickly. Each part of the UNI Clicker development kit contains the components necessary for the most efficient operation of the same board. In addition to the possibility of choosing the UNI Clicker programming method, using a third-party programmer or CODEGRIP/mikroProg connected to onboard JTAG/SWD header, the UNI Clicker board also includes a clean and regulated power supply module for the development kit. It provides two ways of board-powering; through the USB Type-C (USB-C) connector, where onboard voltage regulators provide the appropriate voltage levels to each component on the board, or using a Li-Po/Li

Ion battery via an onboard battery connector. All communication methods that mikroBUS™ itself supports are on this board (plus USB HOST/DEVICE), including the well-established mikroBUS™ socket, a standardized socket for the MCU card (SiBRAIN standard), and several user-configurable buttons and LED indicators. UNI Clicker is an integral part of the Mikroe ecosystem, allowing you to create a new application in minutes. Natively supported by Mikroe software tools, it covers many aspects of prototyping thanks to a considerable number of different Click boards™ (over a thousand boards), the number of which is growing every day.

UNI clicker double image

Microcontroller Overview

MCU Card / MCU

default

Type

8th Generation

Architecture

ARM Cortex-M3

MCU Memory (KB)

256

Silicon Vendor

STMicroelectronics

Pin count

100

RAM (Bytes)

65536

Used MCU Pins

mikroBUS™ mapper

Program Selection
PA0
AN
Reset
PA6
RST
Program Selection
PD14
CS
NC
NC
SCK
NC
NC
MISO
NC
NC
MOSI
NC
NC
3.3V
Ground
GND
GND
Program Selection
PC9
PWM
Program Selection
PD7
INT
NC
NC
TX
NC
NC
RX
I2C Clock
PB6
SCL
I2C Data
PB7
SDA
Power Supply
5V
5V
Ground
GND
GND
1

Take a closer look

Schematic

DSP Click Schematic schematic

Step by step

Project assembly

UNI Clicker front image hardware assembly

Start by selecting your development board and Click board™. Begin with the UNI Clicker as your development board.

UNI Clicker front image hardware assembly
GNSS2 Click front image hardware assembly
SiBRAIN for STM32F745VG front image hardware assembly
Prog-cut hardware assembly
GNSS2 Click complete accessories setup image hardware assembly
UNI Clicker Access MB 1 - upright/background hardware assembly
Necto image step 2 hardware assembly
Necto image step 3 hardware assembly
Necto image step 4 hardware assembly
Necto image step 5 hardware assembly
Necto image step 6 hardware assembly
Necto image step 7 hardware assembly
Necto No Display image step 8 hardware assembly
Necto image step 9 hardware assembly
Necto image step 10 hardware assembly
Debug Image Necto Step hardware assembly

Track your results in real time

Application Output

After loading the code example, pressing the "DEBUG" button builds and programs it on the selected setup.

Application Output Step 1

After programming is completed, a header with buttons for various actions available in the IDE appears. By clicking the green "PLAY "button, we start reading the results achieved with Click board™.

Application Output Step 3

Upon completion of programming, the Application Output tab is automatically opened, where the achieved result can be read. In case of an inability to perform the Debug function, check if a proper connection between the MCU used by the setup and the CODEGRIP programmer has been established. A detailed explanation of the CODEGRIP-board connection can be found in the CODEGRIP User Manual. Please find it in the RESOURCES section.

Application Output Step 4

Software Support

Library Description

This library contains API for DSP Click driver.

Key functions:

  • dsp_set_effect - DSP reverb and multi-effects setting function

  • dsp_power_on - DSP power on the device function

  • dsp_reset - DSP reset the device function

Open Source

Code example

This example can be found in NECTO Studio. Feel free to download the code, or you can copy the code below.

/*!
 * @file main.c
 * @brief DSP Click Example.
 *
 * # Description
 * This application controls reverb and multi-effects Digital Multi-Effects DSP 
 * provides different sound performance of the DSP Click.  
 *
 * The demo application is composed of two sections :
 *
 * ## Application Init
 * Initializes GPIO driver, set the default configuration and start to write log.
 *
 * ## Application Task
 * This is an example that shows the use of a DSP click board.
 * In this example, we change different sound effects
 * such as multiple reverbs, echo, phaser, chorus, flanger, etc. every 10 sec.
 * Results are being sent to the Usart Terminal where you can track their changes.
 *
 * @author Nenad Filipovic
 *
 */

#include "board.h"
#include "log.h"
#include "dsp.h"

static dsp_t dsp;       /**< DSP Click driver object. */
static log_t logger;    /**< Logger object. */
static uint8_t effects = DSP_SET_EFFECT_MEDIUM; 


void display_effects ( void ) {
    switch ( effects ) {
        case DSP_SET_EFFECT_MEDIUM: {
            log_printf( &logger, " Reverb, Small hall (1.5 sec.)\r\n" );
            break;
        }
        case DSP_SET_EFFECT_CHAMBR7B: {
            log_printf( &logger, " Reverb, Big hall (2.8 sec.)\r\n" );
            break;
        }
        case DSP_SET_EFFECT_ROOM3B: {
            log_printf( &logger, " Reverb, Room (1.8 sec.)\r\n" );
            break;
        }
        case DSP_SET_EFFECT_CHAMBER2: {
            log_printf( &logger, " Reverb, Church (7 sec.)\r\n" );
            break;
        }
        case DSP_SET_EFFECT_REVERS3B: {
            log_printf( &logger, " Reverb Reverse (1.2 sec.)\r\n" );
            break;
        }
        case DSP_SET_EFFECT_GATED4B: {
            log_printf( &logger, " Reverb Gated (0.8 sec.)\r\n" );
            break;
        }
        case DSP_SET_EFFECT_ROOM2A: {
            log_printf( &logger, " Reverb Chapel (3 sec.)\r\n" );
            break;
        }
        case DSP_SET_EFFECT_SPRING3B: {
            log_printf( &logger, " Reverb Spring (2 sec.)\r\n" );
            break;
        } 
        case DSP_SET_EFFECT_PHASER1: {
            log_printf( &logger, " Phaser\r\n" );
            break;
        }
        case DSP_SET_EFFECT_FLANGER2: {
            log_printf( &logger, " Flanger\r\n" );
            break;
        }
        case DSP_SET_EFFECT_DELAY7: {
            log_printf( &logger, " Echo\r\n" );
            break;
        }
        case DSP_SET_EFFECT_CHORUS4: {
            log_printf( &logger, " Chorus\r\n" );
            break;
        }
        case DSP_SET_EFFECT_EARLREF4: {
            log_printf( &logger, " Early Reflection\r\n" );
            break;
        }
        case DSP_SET_EFFECT_AMB4: {
            log_printf( &logger, " Big Ambience\r\n" );
            break;
        }
        case DSP_SET_EFFECT_DELAY3: {
            log_printf( &logger, " Stereo Delay\r\n" );
            break;
        }
        case DSP_SET_EFFECT_DELAY1: {
            log_printf( &logger, " Slap-back Delay\r\n" );
            break;
        }
        default: {
            log_error( &logger, " Error" );
            break;
        }
    }     
}

void application_init ( void ) {
    log_cfg_t log_cfg;  /**< Logger config object. */
    dsp_cfg_t dsp_cfg;  /**< Click config object. */

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );
    log_printf( &logger, "\r\n" );
    log_info( &logger, " Application Init " );

    // Click initialization.

    dsp_cfg_setup( &dsp_cfg );
    DSP_MAP_MIKROBUS( dsp_cfg, MIKROBUS_1 );
    if ( dsp_init( &dsp, &dsp_cfg ) == DIGITAL_OUT_UNSUPPORTED_PIN ) {
        log_error( &logger, " Application Init Error. " );
        log_info( &logger, " Please, run program again... " );

        for ( ; ; );
    }
    dsp_default_cfg ( &dsp );   
    log_info( &logger, " Application Task \r\n" );
    Delay_ms( 100 );
    
    log_printf( &logger, "-------------------------------\r\n" );
    log_printf( &logger, "           DSP click           \r\n" );
    log_printf( &logger, "-------------------------------\r\n" );
    log_printf( &logger, "     Digital Multi-Effects     \r\n" );
}

void application_task ( void ) {
    log_printf( &logger, "-------------------------------\r\n" );
    dsp_set_effect( &dsp, effects );
    display_effects( );
    
    effects++;
    if ( effects > DSP_SET_EFFECT_DELAY1 ) {
        effects = DSP_SET_EFFECT_MEDIUM;
    }

    Delay_ms( 10000 );  
}

void main ( void ) {
    application_init( );

    for ( ; ; ) {
        application_task( );
    }
}

// ------------------------------------------------------------------------ END

Additional Support

Resources