3 Replies Latest reply on May 28, 2019 3:45 AM by LePo_1062026

    Transmission of two audio channels using ADC+AMUX


      Hello everyone!

      I'm trying to transmit two audio signals using two PSOC 5LP cards, the first one is going to be an input card and the second is going to be an output card. I chose to use a Delta Sigma ADC on a multi Sample mode with a sampling frequency of 44 kHz and a resolution of 12 bits (I'm trying to get closer to the HIFI norm). I chose an Analog Mux to multiplex my two signals.

      On the other card, a DVDAC of 12 bits and an Amux. The transmision is done by UARTS working in a speed of 921600 bps. CE.JPGCR.JPG

      Since the UARTs can only send 8 bits each time, I divided the ADC output on two parts and added two bits to each one to adress the channel and to know if it is a MSByte or an LSByte. We only use 12 bits out of 16 bits = (6+2) bits + (6+2) bits which is the size of the ADC Output and the DAC Input.

      The following pieces of code show the used protocole.

      On the input card:


      On the output card:


      My question is as follows: Is this the correct way of using an Analog multiplexer? Why is it that I get a noisy signal out of the second card which does not change with the frequency of the sinewave on the input?

      I know I'm asking a lot but I really need help with this project in order to validate my semester. Thank you!

        • 1. Re: Transmission of two audio channels using ADC+AMUX


          Using AMUX-es overcomplicates the project. I recommend to use two separate SAR_ADC and two DAC's on the receiving side (and, maybe, two separate UARTs for expense of one extra wire).


          Using UART directly negates deterministic data output by VDAC, for higher quality, data better to be buffered on receiver side and transferred to DACs via DMA.


          • 2. Re: Transmission of two audio channels using ADC+AMUX


            I forgot to mention that the communication between the two cards should be serial in order to replace wires with Leds later on. However, I will try to use what yuo said. Thank you

            • 3. Re: Transmission of two audio channels using ADC+AMUX



              I agree.  I also noticed Sami is using a AMux for the dithered VDAC output.  Using a dithered VDAC generally requires an external RC on output to smooth out the dithering of the 8-bit VDAC being used.  His TopDesign doesn't indicate a RC smoothing circuit and whether the Amux being used has maximum isolation.


              Additionally with the dithering occurring, I'm not sure each output channel gets enough time with the DVDAC.  There are multiple complications of syncing the one DVDAC to the output AMux.


              Complications when you switch output channels:

              • DVDAC Output signal settling time.
              • DVDAC Output 'glitching' especially if output In_droit is significantly different than In_gauche.
              • Syncing the switching of output AMux with the above mentioned settling time and glitching.  You would need to turn off both channels In_droit and In_gauche until the output is stable before selecting the appropriate channel.
              • Since AMux is not connected to the output 100% of the time, the RC smoother is driving a load (1K by standard conventions) which will dissipate the charge on the C when not connected to the DVDAC.

              He might be able to get away with a AMux'd ADC but the two VDAC solution is almost required here.

              The best he could do if he was required to use only one VDAC is to feed each of the outputs of the the two channel AMux (shown above) into a Peak-hold Opamp configuration.