Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 5 > ADC_SAR error in PSoC Creator 2 & inaccuracy in ADC_DelSig

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



ADC_SAR error in PSoC Creator 2 & inaccuracy in ADC_DelSig
Moderator:
ANCY

Post Reply
Follow this topic



ADC_SAR error in PSoC Creator 2 & inaccuracy in ADC_DelSig

Swee Huei posted on 23 May 2012 7:45 PM PST
Top Contributor
33 Forum Posts

I am using the PSoC5 development kit, CY8CKIT-050, and face 2 issues.

 

1) I received the attached error "Component SAR could not be place because no more SAR blocks are available". However, I only use 1 ADC-SAR block in PSoC Creator 2, hence I don't understand why I cannot place the ADC_SAR block. Can anyone please advise?

 

2)  Then I changed to use ADC_DelSig, but I found that the actual input voltage value is different from the measured output value. Eg. the input voltage is 1.893V, but the measured output value is 1.932V. There is an offset of about 0.03V. I am using a resolution of 16 for the ADC_DelSig. Can anyone advise how to reduce the offest? I have attached the program in this post.

 

Thanks & Regards




Re: ADC_SAR error in PSoC Creator 2 & inaccuracy in ADC_DelSig

Bob Marlowe posted on 24 May 2012 10:14 PM PST
Top Contributor
1768 Forum Posts

Well, you didn't attach the program or project, but just a picture of your Creator IDE.

Will you be so kind to upload the complete project here?

Bob



Re: ADC_SAR error in PSoC Creator 2 & inaccuracy in ADC_DelSig

hli posted on 24 May 2012 04:46 AM PST
Top Contributor
675 Forum Posts

It might be that you exhausted some chip resources. For example, I see a large analog mux in your schematic. This might block the port needed for bypassing the SAR-ADC reference (you see the message about its auto placement in the log). So check which pins are used by your input pins, and look at the warnings in the log file about which resources they block.



Re: ADC_SAR error in PSoC Creator 2 & inaccuracy in ADC_DelSig

Swee Huei posted on 24 May 2012 05:36 PM PST
Top Contributor
33 Forum Posts

Hi Bob,

Sorry, please find attached the project file.

Thanks & Regards



Re: ADC_SAR error in PSoC Creator 2 & inaccuracy in ADC_DelSig

Swee Huei posted on 24 May 2012 05:48 PM PST
Top Contributor
33 Forum Posts

Attached is the measured value comparison between the ADC output and the actual input measured by a DMM.

Highlighted in yellow is the actual voltage input into the ADC, while the blue column is the measurement value by the ADC.

I used a DelSig_ADC for this comparison. I am not sure how to improve the accuracy.

Regards



Re: ADC_SAR error in PSoC Creator 2 & inaccuracy in ADC_DelSig

Swee Huei posted on 24 May 2012 05:51 PM PST
Top Contributor
33 Forum Posts

Sorry, please refer to attached zip file.



Re: ADC_SAR error in PSoC Creator 2 & inaccuracy in ADC_DelSig

Bob Marlowe posted on 25 May 2012 11:29 PM PST
Top Contributor
1768 Forum Posts

Have a look at the datasheet for the ADC (Page 5)  concerning the different conversion modes when using a multiplexeor as it is the case in your project. It states tht you ought to use the "Multi-sample" mode to get clean and clear results and

If you do not switch between measures you should drop the first three results before the first is correctly converted. Thid behaveour is needed for some filtering which is done internally.

As I was told, interrupt latency will spoil the precision of AD-conversion and as I can see some (4?) sources for interrupts in your project I would suggest (at least in the pase of testing) to disable those ISRs during a precise measure and re-enable them after the result is there. There are some appnotes about the precision of AD-conversions and the even suggest to stop most switching within the chip (Timers, PWMs etc.) to reduce generated noise because 16 bit precision is really a lot!

Bob 



Re: ADC_SAR error in PSoC Creator 2 & inaccuracy in ADC_DelSig

Bob Marlowe posted on 25 May 2012 11:34 PM PST
Top Contributor
1768 Forum Posts

Oh yes, another one: for 16 bit ADC you'll need to call ADC_1_GetResult32() see datasheet Pg 25 on Getresult16().

Bob



Re: ADC_SAR error in PSoC Creator 2 & inaccuracy in ADC_DelSig

Swee Huei posted on 25 May 2012 02:10 AM PST
Top Contributor
33 Forum Posts

Hi Hli,

Problem with the ADC_SAR is solved. This is because I have already used P0[2] and P0[4] for other purposes, which is required when the ADC_SAR is configured as 'internal Vref, bypassed'.

 

Thanks for your advise.

 






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: GRAA; Secondary Owner: RAIK; Sunset Date: 01/01/20