cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1

Anonymous
Not applicable

Hello Everyone,

   

Could you help me with my ADC, I cannot get it Right I want to use ADC for input range of (+/- 1.25) in a differential input range with a refrenve of vdda/4 = 1.25. could you tell me what is the voltage range and the corresponding digital value in decimal?

   

Thanks.

   

maxdamage.

0 Likes
4 Replies
Bob_Marlowe
Expert II

I would try these settings

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hi,i think you did not get my question right, I am using 16 bit resolution with the configaration defined above in the post so what happen if I insert for instance 6 mV what is the output decimal conversion?

0 Likes
Bob_Marlowe
Expert II

Easiest would be to use some of the internal constants the component defines for you, they get changed automatically when you alter the specifications for the ADC.

   

 

   

(ADC_DelSig_1_CFG1_COUNTS_PER_VOLT * 6) / 1000 would give the counts for 6 mV

   

 

   

Bob

0 Likes
ETRO_SSN583
Esteemed Contributor

This API takes into account your settings and returns a converted value -

   

 

   

int16 ADC_CountsTo_mVolts(int32 adcCounts)
Description: Converts the ADC output to millivolts as a 16-bit integer. For example, if the ADC measured
0.534 V, the return value would be 534 mV. The calculation of voltage depends on the value
of the voltage reference. When the Vref is based on Vdda, the value used for Vdda is set for
the project in the System tab of the Design Wide Resources (DWR).
Parameters: int32 adcCounts: Result from the ADC conversion.
Return Value: int16: Result in mV.
Side Effects: None

   

 

   

Note you gave to use the int32 ADC_GetResult32(void)

to pass to this function.

   


   

Regards, Dana.

0 Likes