Post Go back to editing

source selection using adc potentiometer

Thread Summary

The user asked if it's possible to select one of several inputs using an analog potentiometer connected to the auxiliary ADC on the ADAU1701. The support engineer provided an example project for an index-selectable filter, which can be adapted for input MUX selection. The value from the auxiliary ADC is in 5.23 format (0...1). The user inquired about the circuit's resistance to transients and suggested implementing hysteresis.
AI Generated Content
Category: Software

Hi,
Is there a way to select one of several inputs using an analog potentiometer connected to the auxiliary ADC on the adau1701?

Just like in the attached image.

Thanks for your reply. Regards.

Parents
  • Hi everyone,

    I now understand the problem with the table. This block has two tiny buttons that select the input and output data formats. They need to be set correctly. The ADC input format is fractional, and the output format is integer.

    Anyway, as Dave wrote, this solution limits us to 16 possibilities. The 5.23 format allows for 16 integers.

    Is there a simple and elegant way to convert a 5.23 format number from 0.01 to 0.99 to a 28.0 format number from 0 to 100? Incrementing by 1.

  • Hi Kuba-s

    Try on a paper to do a few numbers binary in both formats 0.01, 0.02, 0.03 then it will become clear to you ;-)

    All the best
    John

  • Thanks. Good way to learn.
    If I'm not mistaken, it will look like this:

    Actually, the range isn't 0..100, but up to 128, but that's okay.

    In that case, I need to zero out the 16 lowest bits and shift 16 bits to the right.
    Is there such an option in sigmastudio?

    I heard that the divide function doesn't work very efficiently in adau1701.
    Sorry for such basic questions.

    edit:

    It seems I can use multiplication by the reciprocal. Instead of dividing by 2^16 = 65536, multiply by 1 / 65536 = 0.0000152588, which is 128 in 28.0 format. I wonder if that will work. I'll check when I have access to the hardware. :-)

  • In theory, it works, but in practice, I get this:

    Why is the resolution so low, when the ADC input itself offers much higher accuracy?

  •      SigmaStudio's Real Time Display gets its data from the DSP's Readback register.  Unfortunately, the -1701 Readback register truncates its lowest four bits.  This causes the plot's low resolution.

         Best regards,

         Bob

  • Okay, thanks for the reply.
    Indeed, the device works in a real circuit.
    It seems that to convert a 5.23 format number, simply multiply it by 1 for the 28.0 format, or a multiple thereof if you want to multiply it.

    In my example, I used a potentiometer to adjust the tone. It works.

Reply Children
No Data