Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 5 > Amux with ADCs

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



Amux with ADCs
Moderator:
ANCY

Post Reply
Follow this topic



Amux with ADCs

gstroz posted on 18 Nov 2011 12:50 PM PST
Member
2 Forum Posts

 Hi,

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.

 

Thanks




Re: Amux with ADCs

H L posted on 18 Nov 2011 04:12 PM PST
Top Contributor
679 Forum Posts

Here is a code example


 http://www.cypress.com/?rID=38799


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


 



Re: Amux with ADCs

gstroz posted on 18 Nov 2011 07:01 PM PST
Member
2 Forum Posts

 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. 



Re: Amux with ADCs

H L posted on 18 Nov 2011 07:29 PM PST
Top Contributor
679 Forum Posts

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.

 



Re: Amux with ADCs

Gautam Das posted on 20 Nov 2011 11:53 PM PST
Cypress Employee
742 Forum Posts

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.



Re: Amux with ADCs

hli posted on 21 Nov 2011 04:07 AM PST
Top Contributor
675 Forum Posts

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).






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: KXP; Secondary Owner: VWA; Sunset Date: 01/01/20