ΣSigmaStudio Ask AI Русский Log in

ADAU1452 Index Selectable Filter

SigmaDSP & SigmaStudio GeCo Jan 6, 2024 00:00 6 replies Original on forum ↗
Subscribe
GeCo Question
Jan 6, 2024 00:00

a simple test...
I turn the potentiometer... but it doesn't change the selected curve.

where am I wrong?

Thank you

Audio Signal Processors

adau1452

Audio Products

software

SigmaDSP Audio Processors

test-ADAU1452-ISF.jpg
test-ADAU1452-ISF.jpg
ADIApproved Reply
Jan 6, 2024 00:00

ADI North America will be on winter shutdown starting December 25, 2023; perhaps another community member can assist you until our return on January 8, 2024.

KJBob Reply
Jan 7, 2024 00:00

Hello,

The AuxADC outputs an integer (32.0 format) value from 0 -- 1023 according to the pot position. The Index Filter needs an index input from 0 to (N-1) integer, where N is the number of filter curves. The example below has four filter curves; thus, we can use an eight-bit shift - right to reduce the AuxADC value to a range of 0 -- 3.

The Stimulus-Probe tool predicts rather than simulates the response of the filters; you need not connect hardware or even compile your project to use it. Thus, it has no idea of what index your filter sees at runtime. As a result, it ignores the index and shows one of the curves. For more info on this, see Stimulus-Probe Capabilities and Limitations.

I attached my example project -- since I'm using an older evaluation board, its AuxADC # varies from yours so go ahead and change it to suit your hardware.

1452_Index-Fil-AuxADC.zip

Best regards,

Bob

1452_Index-Fil-AuxADC_sch.png
1452_Index-Fil-AuxADC_sch.png
GeCo Reply
Jan 8, 2024 00:00

what if i have more curves?

that's right?

adau1452-5255.jpg
adau1452-5255.jpg
Harishgowtham Reply
Jan 8, 2024 00:00

Hello Bob,

Sorry for interrupting and thank you for your extraordinary support as always, keep them coming.

Hello GeCo,

You can either use a gain block or a shift block.

1) If you have eight curves, then it's 0-7.

i) 8/1023 = 0.0078201, It will go up to 0 to 7. here 8 in the numerator is the number of curves.

ii) if you have 6 curves then 6/1023 = 0.005865. It will go up to 0 to 5.

Please look at the picture below,

2) By shifting, if you shift 1023 to 1 bit right then you will get 511 (0 to 511 which is 512 states)

if you shift 1023 to 2 bits right then you will get 255 (0 to 255 which is 256 states)

if you shift 1023 to 3 bits right then you will get 127 (0 to 127 which is 128 states)

If you want to have a number between 0 to 7 (8 states) then shift 1023 to 7 bits right.

In Bob's example above, he shifted 1023 to 8 bits right, so that you get 4 states (0-3)

Regards,

Harish

pot.PNG
pot.PNG
GeCo Reply
Jan 9, 2024 00:00

bob thanks.

but I'm afraid I didn't understand well. what if I have 10 curves? just for example. (always ADAU1452)
​

KJBob Reply
Jan 9, 2024 00:00

Hello GeCo,

Often there's more than one way to do things in SigmaStudio, and it appears that you were on the best track. I tried two different ways to work with an arbitrary number of filters. The one shown below proved more workable. Like your first project it uses a 14-bit Shift Left, which converts the AuxADC output to 0 - 0.9992 (just below 1.0) decimal. You were on to this idea originally! Then, to adapt to any number of filters N, simply multiply by integer N. The result is the integer 0 -- (N-1) range the index filter needs. Adapting to a different number of filters only requires changing N in the DC source.

It may well be that at one point you had completed and tried this very method -- yet it didn't seem to work. Often when correct logic seems to fail, something else is the real cause. I've found, for example, that my ears can hardly hear subtle filter adjustments with a typical input, whether speech, music, or noise. Using exaggerated filter responses helps. Also, you're using readbacks, which is an excellent troubleshooting idea.

Finally, when looking for assistance on EZ it helps to attach your test project itself instead of (or in addition to) a screenshot. Other members, whether an ADI engineer or a volunteer like me, is far more likely to help when they need not duplicate the test case. They also may take more time studying the original test when they have it in front of them.

BTW -- the 14-bit Shift Left renders the -1452's AuxADC range much like that of the venerable -1701, whose AuxADCs range from 0 -- (255/256) naturally,

1452_Index-Fil-Multiply.zip

Best regards,

Bob

1452_Index-Fil-Multiply-sch.png
1452_Index-Fil-Multiply-sch.png