How it works - AidaDSP/AidaDSP.github.io GitHub Wiki

How it works

Aida DSP block diagram

Aida DSP is board built around ADAU1701 DSP from Analog Devices. This DSP is part of large family of programmable DSPs called Sigma DSP. Aida DSP's existing library runs on Arduino Uno/Mega/Due and Energia (TM4C123) and can simplify a lot the programmer's job when trying to control Sigma DSPs from a microcontroller.

Aida DSP API library is supporting now ADAU170x and ADAU144x, the little and the beast! The library is composed by 2 files: AidaDSP.cpp and AidaDSP.h. This is a library written for Arduino/Energia enviroments and uses a modified custom version of I2C library.

IMPORTANT NOTES You can find complete guide on how to install these custom I2C libraries here.

When working with Sigma DSP ICs, programmer has to write his DSP program (Audio processing algorithm) with Sigma Studio, an IDE which features graphical programming.

Sigma Studio

This procedure is similar to many existing graphical programming enviroments such as Max/MSP. The difference is that at compiling time assembler code is generated that runs into DSP hardware, increasing performance.

For going deeper in Sigma Studio usage, please read the appropriate chapter here.

When the programmer has finished his audio algorithm then he need a way to download it to DSP. In Sigma Studio there is a menu utility called export system files that saves on your computer an .xml file with the name of your Sigma Studio project. This file is very important: when the user created his algorithm he picked from Sigma Studio library some processing blocks or cells. These cells are for example an equalizer or a volume control. Every cell has its own address giving the microcontroller the possibility of modifying cell parameters while audio algorithm is running (DSP program).

We've made a Java utility called AidaDSPHeaderFileGenerator: this program is a tool which converts .xml Sigma Studio files in C header file (.h) ready to be included in a microcontroller code and called AidaFW.h

You can find this useful tool here

The programmer now can switch working on Arduino/Energia IDE. To test his Audio program he can make a simple sketch like this:

#include <Arduino.h>
#include <Wire.h>
#include "AidaFW.h"
#include "AidaDSP.h"

void setup()
{
  // put your setup code here, to run once:

  // DSP board
  InitAida();	// Initialize DSP board
  digitalWrite(RESET, HIGH); // Wake up DSP
  delay(100);  // Start-up delay for DSP
  program_download();    // Here we load program, parameters and hardware configuration to DSP
  delay(20);
}

void loop()
{
  // put your main code here, to run repeatedly:

}

This sketch basically call two functions of Aida DSP API: InitAida(); and program_download();.

The first function, InitAida(); is called to configure RESET and SBOOT pins as well as I2C port. In this function also ENCODER interrupts are configured: this generally change from board to board but with AidaDSP API programmer doen't have to take care of.

The second function, program_download();, is called after RESET signal goes high: its purpose's to download the DSP program previously developed in Sigma Studio to DSP everytime board is powered or after a reset. At the time of writing, the DSP program is saved in microcontroller's flash memory.

You may be interested in a complete guide on how to create an audio project from Sigma Studio to Arduino code.

⚠️ **GitHub.com Fallback** ⚠️