Post Go back to editing

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.

Parents
  •      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:

    1. 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.
    2. 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.
    3. 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.
    4. Parametric and Shelf filter coefficients can be obtained by adapting the calculations in the spreadsheet at https://ez.analog.com/message/159539#159539
    5. 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

Reply
  •      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:

    1. 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.
    2. 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.
    3. 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.
    4. Parametric and Shelf filter coefficients can be obtained by adapting the calculations in the spreadsheet at https://ez.analog.com/message/159539#159539
    5. 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

Children
No Data