7 Replies Latest reply on Nov 21, 2011 6:07 AM by HeLi_263931

    Amux with ADCs



      I'm attempting to emulate a multi channel ADC using PSoC 5. I have it set up using a Amux Sequencer with the output leading to the Delta Sigma ADC. I've tried setting the ADC to run in multisample mode and stopping the conversions before switching the channels. I then switch the channels and start the conversions again. When I do this, I get the same result for both channels. That is, I always get the result from channel 0, not channel 1 - even if I say "next channel". 


      However, if I set the Delta Sigma ADC to continuously run and add a 100 us delay after the channel switch then I see the correct output. 


      Is there some know bug for using an Amux with the ADCs? The amux data sheet does not list a settling time or any necesssary information. Any suggestions? My goal is to get the period as low as possible, so have a delay is not ideal.





        • 1. Re: Amux with ADCs

          Here is a code example




          Donwload the exmaple and play with it, see how it was used.

          • 2. Re: Amux with ADCs

             Thank you for the example code. I was able to get it working in my setup. I just had to add a wait for conversion to complete function to get the appropriate results.


            Now that I have this working with the delta sigma ADC, would it be possible to have a similar setup with the SAR ADCs? They don't seem to support multi sample mode or anything related to switched inputs. Can anyone comment on the steps necessary to have the SAR ADCs hooked up  to an AMUX and give accurate results? Now that I've seen the accuracy of the Delta Sigma ADC I want to see the speed comparison with the same setup on the SAR ADCs. 

            • 3. Re: Amux with ADCs

              Here is what to do


              select channel with MUX;


              start SAR ADC;


              while not complete{};


              read adc value;




              I normaly not use the continous mode, as I can control when to start the conversion. 


              One thing you should know that there is a bug in the initilization of the SAR of PSoC5, (I think it is same bug in PSoC 3). Can not  remember what exatly it is. May be someone in Cypress would help here. Otherwise wait until next monday when I'm back to the office.

              • 4. Re: Amux with ADCs

                Hi gstroz,




                SAR ADC supports sampling rate of upto 700 kSPS.


                At this rate, it is advisable to use DMA to do the transfer. A code example is available which explains the Hardware multiplexing of SAR ADC.


                Link to the Code Example is http://www.cypress.com/?rID=47003




                The End Of Conversion (EOC) signal of SAR ADC is used to trigger the DMA transfer.

                • 5. Re: Amux with ADCs

                  IIRC there is a bug(?) with the PSoC5 ES1. It prevents using the Delta-Sigma-ADC the same as the SAR ADC with respect to interfacing the AMuxHw. The second example shows how the SAR ADC can be used to automatically switch between multiple channels, using the EOC signal. This doesn't work with the DelSigADC, here the switch has to be made in software, since the EOC signal somehow cannot be used to switch to the next mux channel 8but I forgot the details).

                  • 6. Re: Amux with ADCs

                     Dear H L,


                    can u repost the link, it seems that its been relocated; its no longer available @  http://www.cypress.com/?rID=38799

                         please check and update.   
                        thanks in advance.   
                    • 7. Re: Amux with ADCs

                      There is an example project in Creator, use link on Start Page,


                      "Find Example Project" -