SigmaStudio design that implements IF..THEN..ELSE like software clause

Hi Team,

Please help.

How do I implement a software like "IF..THEN..ELSE" switch clause in SigmaStudio design?

For example, a "Mute" cell will be turn ON if GPIO MP7 input is in RAISE condition, while this "Mute" cell will be turn OFF if this GPIO MP7 inputs is in FALL condition.

regards,

ping

  • Hello Ping,

    There is a detailed answer coming overnight by a different support engineer. 

    Dave T

  • Hello ping,

    To answer your question about an IF/THEN/ELSE implementation in SigmaStudio.

    We have three approaches but each has it's own way of usage.

    1) The first solution will be the AB/CD block that implements this exact structure.
        It is very flexible with the test condition and there is so much that can be done using this block.    It  is fairly lean on instructions so you will see this used a lot.
     But you must know that the AB/CD block is not the best because
     there is no slew when switching from the signal to a muted condition.
     So you must be aware of that the AB/CD block is not the best to use for your condition which you mentioned earlier unless no slew is acceptable.
     
    2)For muting a signal from a GPIO You can use a MUX that has slew. This is good for one channel.

    3)Another solution would be to use an external controlled volume control.
    This is more easily grown to mute multiple channels and it has many slew options.
     
    I have attached an example project that uses all three approaches to this problem.

    Kindly revert us if anymore clarification is required.

    Thanks Dave for your support.

    Regards,

    Harish
     ADAU1467 If Then Else solutions using GPIO for Muting.dspproj

  • Hi Harish,

    Thanks for your answers. They are very helpful for a new comers like me.

    To be more specific, let's say that I have

    1) IO category: Output channel 1 is used

    2) Path_1: an audio path that has a "Voice Activity Detector" cell in parallel with another "Single Level Detector w Numerical Display" cell and then goes to the Output channel 1

    3) Path_2: an audio path that has a "Sine Tone Generator" cell then a "Single Level Detector w Numerical Display" cell and the goes to the 

    4) MP7: A GPIO Input that connects to an external MCU GPIO

        4-1) IF MP7 signal is HIGH (logical 1) THEN 

  • Hi Harish,

    Sorry wrong key pressed.

    Please see this.

    Hi Harish,

    Thanks for your answers. They are very helpful for a new comers like me.

    To be more specific, let's say that I have

    1) IO category: Output channel 1 is used

    2) Path_1: an audio path that has a "Voice Activity Detector" cell in parallel with another "Single Level Detector w Numerical Display" cell and then goes to the Output channel 1

    3) Path_2: an audio path that has a "Sine Tone Generator" cell then a "Single Level Detector w Numerical Display" cell and the goes to the Output channel 1

    4) MP7: A GPIO Input that connects to an external MCU GPIO

        4-1) IF MP7 signal is HIGH (logical 1) THEN Path_2 ("ONLY") will be taken

        4-2) IF MP7 signal is LOW (logical 0) THEN Path_1 ("ONLY") will be taken

    regards,

    ping

  • Hello Ping,

    I think you need to give us a lot more information. What is your application? Draw signal flow diagrams to show what you want to do with signal flow and control. Then take some of the examples we have given you and make an attempt to put together a project. Then we can look at it and make comments. Without understanding your application requirements we have to give very general solutions, and several solutions, to try to cover all possibilities. 

    The output of the activity detector has envelop and other processed and calculated outputs not audio. So this is all confusing to understand what you are actually trying to do. 

    Dave T