Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 5 > ADC Delta Sigma Math

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



ADC Delta Sigma Math
Moderator:
ANCY

Post Reply
Follow this topic



ADC Delta Sigma Math

MattCoughlin posted on 19 Jun 2012 7:23 AM PST
Senior Member
17 Forum Posts

 

I'm using a Delta Sigma ADC in my project, and I'm having trouble getting correct values for Vin. The math from the example project doesn't seem to work, and I'm not sure what the real formula I should be using is. Does anyone know the correct equation to convert the result from the ADC to the real Vin?

Thank you




Re: ADC Delta Sigma Math

danaaknight posted on 19 Jun 2012 10:27 AM PST
Top Contributor
1773 Forum Posts

These API calls make life easy -

 

int32ADC_CountsTo_mVolts(int32adcCounts)

Description: ConvertstheADCoutput tomVasa32-bit integer.Forexample,if theADCmeasured

0.534V, thereturnvaluewouldbe534mV.

Parameters: int32adcCounts:ResultfromtheADCconversion.

ReturnValue: int32:Result inmV.

SideEffects: None

int32ADC_CountsTo_uVolts(int32adcCounts)

 

Description: ConvertstheADCoutput toµVasa32-bit integer.Forexample,if theADCmeasured

ñ0.02345V, thereturnvaluewouldbeñ23450µV.

Parameters: int32adcCounts:ResultfromtheADCconversion.

ReturnValue: int32:Result inµV.

SideEffects: None

 

 

floatADC_CountsTo_Volts(int32adcCounts)

 

Description: ConvertstheADCoutput tovoltsasafloatingpointnumber.Forexample,if theADC

measuresavoltageof 1.2345V,thereturnedresult wouldbe+1.2345V.

Parameters: int32adcCounts:ResultfromtheADCconversion.

ReturnValue: Float: Resultof thelast ADCconversion.

SideEffects: None

Regards, Dana.



Re: ADC Delta Sigma Math

pvkv posted on 21 Jun 2012 05:46 AM PST
Cypress Employee
15 Forum Posts

 HI,

If you are using VSS to VDD range then you need to set your VDD voltage in systems tab. Open PSOC Creaotor .cydwr file. Open systems tab. In that you will find VDD setting. The APIs use this VDD value to convert from counts to actual voltage. 






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