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

Can I create extra auxiliary ADC by using a external analog mux to a ADAU1701?

SigmaDSP & SigmaStudio Tore Dec 4, 2012 00:00 7 replies Original on forum ↗
Subscribe
Tore Question
Dec 4, 2012 00:00

I need more than the 4 available auxiliary ADC inputs and would like to use an external analog mux controlled from the sigmaDSP ADAU1701. Is it possible to control the external mux from the digital GPIO, connect the mux to one auxiliary ADC input and do demultiplexing in the 1701? I would like to scan all the external analog voltages and use all the values in my DSP program.

/Tore

Audio Signal Processors

SigmaDSP Audio Processors

adau1701

ADIApproved Reply
Dec 4, 2012 00:00

Hello,

The SigmaStudio software that generates code to run in the SigmaDSP core will only allow you to poll the auxiliary ADCs once per audio frame, and it will only allow you to add 4 instances of the auxiliary ADC input cell, so you'll need an external microcontroller to do a bit of work in order to make this possible.

My suggestion would be to do something like this:

The microcontroller would have to follow these steps:

Read ReadBack1

Write that value to DC1

Read ReadBack2

Write that value to DC2

Read ReadBack3

Write that value to DC3

Read ReadBack4

Write that value to DC4

Toggle the signal that controls the multiplexer for the ADC signals

Read ReadBack1

Write that value to DC5

Read ReadBack2

Write that value to DC6

Read ReadBack3

Write that value to DC7

Read ReadBack4

Write that value to DC8

Toggle the signal that controls the multiplexer for the ADC signals

Repeat

By repeating this process over and over in the microcontroller, you will have 8 cells in the project (DC1 through DC8) that will contain the values of the 8 analog signals external to the SigmaDSP.

aae18c544e427a7300ca010f99785623.jpg
aae18c544e427a7300ca010f99785623.jpg
aae18c544e427a7300ca010f99785623.jpg-404x420.jpg
aae18c544e427a7300ca010f99785623.jpg-404x420.jpg
KJBob Reply
Dec 4, 2012 00:00

Hi Brett,

That's a neat idea to vart "DC" sources via serial control from a uC. Can one take it a step further and use the microcontroller's own ADCs for the analog inputs?

ADIApproved Reply
Dec 4, 2012 00:00

Hi Bob,

Yes, you could certainly do that. A "DC" source in SigmaStudio just acts like a variable that gets an address in parameter memory assigned to it. You can have the microcontroller update that memory location with whatever it's reading in on its own ADCs.

KJBob Reply
Dec 5, 2012 00:00

Brett.

Thanks for your help! This means we can pass quite a large set of numbers from a uC into a SigmaDSP and use them just about anywhere in the schematic! I did not even suspect such a possibility till now.

Bob

ADIApproved Reply
Dec 5, 2012 00:00

Yes, the DC Source cells simply act as (input) memory placeholders that you can write from an external uC as needed.

Similarly, the DSP Readback cells act as (output) memory placeholders that can be read by an external uC and used for anything imaginable.

Tore Reply
Dec 6, 2012 00:00

I would like to read from e.g. eight potentiometers and it is not a problem if I can't read every audio frame. Is it possible to, for each radio frame, connect the external analog mux to a different potentiometer and store the different results internally in different places e.g. by using some synchronized switching function?

/Tore

KJBob Reply
Dec 6, 2012 00:00

Hi Tore,

One way to store a variable within SigmaDSP is with a block that feeds back to itself. For example, you can use feedback around an ABCD comparator to build a "track-hold" to store levels in between refreshes. The circuit below uses two of these track-holds to independently control Left and Right volume with just one "input". Here the external mux and controls are simulated inside the SigmaDSP; of course this is where you would connect your external signals and mux.

Hope this helps,

Bob

c46478803f2d5a4ebff0c101d360e8b5.jpg
c46478803f2d5a4ebff0c101d360e8b5.jpg
c46478803f2d5a4ebff0c101d360e8b5.jpg-450x300.jpg
c46478803f2d5a4ebff0c101d360e8b5.jpg-450x300.jpg