Post Go back to editing

Using a Digital Input for an Additional Control Potentiometer

I'm using an ADAU1701 and I essentially need 5 AUX ADC controls (5 different control pots) I'm using the 4 AUX ADCs already, so I just need one more (I'm already using both audio ADC inputs) I assume this is simple enough by using one of the serial data inputs and using the output master clocks to clock the external ADC, but I'm not quite sure how to approach it. Does anyone have a suggestion of a specific ADC part number to use? Serial data confuses me somewhat so I never know what specifications I need. The more instructions you can give me, the better.

Thanks a lot.

  • Hi Austin,

    Being from the audio group, I know a fair bit about audio ADCs. However, audio ADCs are usually designed to handle AC-coupled inputs (in other words, they block the DC component of the signal), so those would typically not be useful for monitoring a slowly-changing control signal like you would typically see on the aux ADC.

    I used the ADC product selection table and came up with a few examples.

    One that seemed like it could be a good fit is the AD7910. The interface is serial, and it seems to resemble I2S, but not exactly. I think you might want to connect with the ADC product support team to make sure that it would work.

    Is there a microcontroller in your system? If so, that could simplify things because the micro could poll the external ADC and then simply write that to a RAM location in the ADAU1701. Some microcontrollers even have built-in Aux ADCs which would save you board space and system costs.

  • Austin wrote:

    Actually in looking at the AD7910 a little more it seems like you can use CS essentually the same as the LRCLK since the date is triggered out on the edge of CS.

    That was my initial thought, yes. However, the problem is that the number of bits actually differs. It looks like the AD7910 will be spitting out 16 bits of data, but the ADAU1701 will be expecting 32 bits. I'm not sure how that will work.

    The question to the ADC team is really this: If we pull CS low and start toggling the CLK line, the AD7910 expects 16 periods before the CS line goes high. If we were to keep toggling the CS line an additional 16 times, would the AD7910 output only zeros?

    If so, then there's a chance this could work. Still, I've never tried anything like this so I think it would require verification on actual hardware in order to be sure it will actually work.

  • Thanks Brett. That's a good point about the audio ADC that I'm sure I would have overlooked until I had the whole thing built up.

    No, there isn't a micro in the system, just the SigmaDSP and I'm trying to keep cost as low as possible (even the AD7910 is a litle pricey) so it seems like an external ADC would be the best option.

    I'll talk to the ADC support team and see what they thing but could you give some specifications to look for? Even the basics are helpful, my background is in analog so while the Sigma chip is easy enough, and while I understand how ADCs work themselvs, the communication isn't something I know well. Like on the AD7910, it only has a single clock terminal (SCLK) but from the user guide for the SigmaDSP it seems like it would have to accept both LRCLK and BCLK (I'm assuming BCLK and SCLK are the same?) or do you only need LRCLK if it's a stereo signal going through one serial port? (which mine currently wouldn't be, but it might be helpful in the future.)

    I don't mean to ask for an introductory course in digital signals, but if you could point me in the right direction that would be tremendously helpful.


  • Actually in looking at the AD7910 a little more it seems like you can use CS essentually the same as the LRCLK since the date is triggered out on the edge of CS. All you would need to do is make sure the edges are going the right direction (which is easy enough to change in SigmaStudio) and then make sure the DSP understands that it's only looking at one channel, since the other one would be blank when the ADC is 'unselected' by the LRCLK. Does that seem right?

    Thanks again.

  • Ok, while I investigate that I decided to try it out with a microcontroller, which might end up being just as cheap and gives me the advantage of having a micro on board. I'm using an ATMEGA328 with the Arduino platform since I'm already fimiliar with it. I'm trying to take it as few steps at a time since I don't really know what I'm doing. I'm able to get them to communicate in the simplest sense, using a switch on the micro to flash an LED on the DSP, so I can at least get one bit across, but in setting things up for serial data I've run into some trouble, I hooked up the output master clocks to the input and then scoped them out as a sanity check, the LRCLK looks fine (I'm able to get 192, 96, or 48kHz) but I can't get anything on the BCLK regardless of the settings. Assumming it's not just simply broken, is there any reason I wouldn't be seeing anything on the BCLK output?

  • The only reason I can think of is if your register settings for the serial port are incorrect. Please check to see if your registers look like this:

  • Aha! Now I think I know what is wrong. The Serial Inputs must always be slave - only the serial outputs can be masters. So, on pins MP4 and MP5 you will not see any signals. Check on MP10 and MP11 and you will see LRCLK and BCLK, respectively.

    You'll have to route the signal from MP10 to MP4 and MP11 to MP5 in order to use the serial inputs in master mode.

  • Actually they weren't right, they were set like this:

    I wasn't able to change them so I just started a new program and they came out like yours. But I still can't get anything on the BCLK pin, I also tried hooking up a sine wave to one of the digital outputs in SigmaStudio but couldn't get anything on that either. The LRCLK looks fine and I'm able to get the fundamental of the system clock (12.288MHz) so I don't think it's simply a rolloff issue with my scope. I'll attach the .dsproj file I'm using to test it if that's any use to you.

  • Figured it out. Your theory gave me the idea of what to test but wasn't quite it. I was using MP10 and MP11 (and also had them connected to MP5 and MP6) but in testing the connections out of curiousity I found out MP11 is shorted to ground, which reminded me that at one point I was using that as an output to drive an LED which at one point stopped lighting up. I never investigated it at the time but it looks like I just blew that output on that pin, either through soldering or overcurrent, so it's no longer usable. I'll have to build it up with another chip and report back.

    Thanks for the help.

  • Austin wrote:

    My next step is to get it to interface with my microcontroller. Do you have a recommendation for a good resource on explaining that? The description in the SigmaDSP manual is a little lacking for someone without much background in microcontrollers.

    There's a FAQ containing some resources that should help get you started: