Need help with dynamic programming basics ADAU1702
Hi, so I'm working on a project where I'm using a micro-controller to drive a display/menu system and program filter coefficients (using a 1702 based evaluation board) such as updating crossover, limiter, or eq. I've done a bit of digging in the user manual and on page 30 it mentions a feature called safeload write. Would it be possible to do what I would like to do: essentially I'd like to read the data memory from essentially a blank set of parametric filters and crossover, modify some parameters with a microcontroller over I2c, and write them back on the fly)?
How would I go about managing the memory and making sure I'm updating the correct registers if so?
Let's assume it's much easier to do all the rotary encoder programming for the menu system in Sigma-Studio rather than outside (which appears to be the case), how would I set up a menu where depending on where I was I would be editing a different filter/parameter with the same knob.
The goal of the system is to create a 2x4 dsp that can be monitored on a LCD (small, think 1x3 inches) and can be altered while music is playing to configure hipass/lowpass per output, speaker EQ, limiting, phase inversion, delay.
Here is an overview of how the menu flow should ideally work. Each -> indicates a press in the rotary encoder:
Menu system displayed on a small LCD with the following structure:
Speaker Mode -> BIAMP or SUB (biamp treats the second pair of outputs as "tweeters" and SUB considers it a sub - mono signal, lower)
Limiter - > Each output, displayed in -dB
Parametric EQ -> Filter 1, Filter 2, Filter 3, Filter 4, Filter 5 -> type (HS/LS/BP) -> Q or gain or frequency -> Individual data edit
Crossovers - > Speaker group (1/2 - sub/hi, 3/4 - mids/fullrange) -> LP or HP -> Filter type (BTW 12,24,48, LR 12/24/48) or Frequency
Thanks and any help would be appreciated, feel free to link me to other similar designs that you know of.
Audio Signal Processors
adau1702
safeload_write
beginner
SigmaDSP Audio Processors
avr_menu
Show More
Hello again Will,
This is again indirectly connected to USBi.
If it is for your personal use, you can use the GUI of the SigmaStudio to update the parameters in real time through the USBi.
Functions with multiple parameters like the parametric equalizer will be difficult and user un-friendly to set using a microcontroller/LCD type UI. Unfortunately AD has not released the much awaited UI tool to the users yet.
Hello,
As KKSL said, the process of integrating your DSP into a finished system does take some engineering. Because of its difficulty relative to the ease of building a SigmaStudio project, it's by far the most asked-about topic in the SigmaDSP community. This means there's plenty of advice available by searching the forum. I'll try to guide you through some of these resources.
After SigmaStudio compiles your project, the Export System Files command generates the files you'll need to have your microcontroller boot your -1702. There's at least two ways to use these files:
ADI's standard method uses the generated C header files which can be referenced in your microcontroller's source code to put everything in the right place. This method is described at: How do I create the microcontroller code to interface to my SigmaDSP? This is by far the best method for most SigmaDSPs.
Unlike many newer / more powerful SigmaDSPs, the ADAU170x has a relatively simple boot sequence. Thus you can simply cut and paste the hex codes that SigmaStudio provides in the TxBuffer export file directly into your microcontroller code. This method is described at Updating SigmaDSP Parameter with a Microcontroller -- which also describes how to have your uC change filter parameters and such. Note that the parameter addresses move when you modify the project flow. ADI's C header files automate such changes, otherwise you'll have to do it manually.
Generally, it's best to place your microcontroller in charge of as much of the system as possible. It should boot the DSP, handle the user interface (LCD, encoders, buttons etc), while holding these settings in NV memory over power down if needed. When the user adjusts EQ or other functions, the microcontroller by calculation and/or lookup tables comes up with the new parameters and safeloads them to the DSP. For very simple applications one could self-boot the -170x and control everything through GPIOs and Aux ADCs, but this becomes impractical when many user controls are involved, such as with parametric EQs.
Parametric and Shelf filter coefficients can be obtained by adapting the calculations in the spreadsheet at https://ez.analog.com/message/159539#159539
Safeloading these coefficients is described at https://ez.analog.com/message/61175#61175
Sorry, I wish it were easier. Where I work our first product booted a -1701 from a PIC18 micro by the manual method. This product needed only minimal interaction between the DSP and the micro, which we handled by GPIOs. Our present prototype has a dsPIC updating filter parameters as described above.
Best regards,
Bob
Hi Bob,
Thanks for the detailed response with all of the links!
Regarding item 1, I just wanted to let you know we have been working on a small I2C/SPI host microcontroller C-code example using the Export System Files feature in SigmaStudio which uses the USBi's onboard Cypress CY7C68053 USB microcontroller. That particular microcontroller has 16K of o-nboard RAM, which should be sufficient for testing many of the smaller-variant SigmaDSPs, but still useful for small test cases for the ADAU1452.
The basic idea here is you can simply use the USBi itself to test the exported files and boot the SIgmaDSP in standalone with no communication with SigmaStudio. No need to wire up a separate host micro eval board. You could also probably use the example as a starting point to test the SigmaStudio sequencer window files, or simply use it to generate some test patterns or register read commands to the SigmaDSP for debug purposes.
SigmaDSP users would only need to install the Cypress supplied eval version of the Keil 8051 compiler and a small Cypress USB console utility which would allow you to download the executable into the USBi's microcontroller RAM.
Hopefully I will have a documented example in the next 4 to 8 weeks..
-JT
Is there an estimated release date on this tool? Just wondering, as I'll probably design this the hard way as has been outlined here, but it would be awfully convenient to have GPIO interactive filters and settings for external gui configuration.
Please log in to reply.