PSOC 4 ADC Don't Read unsigned result

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
PAB
Level 2
Level 2
First like given Welcome!

I had a Problem in reading ADC result in PSOC 4 Program.

use below cmd and it returns 0x1FF.

ch_X = ADC_GetResult16(0);

ADC configuration is below

1.jpg2.jpg

As per the below table from datasheet of ADC SAR it is not supposed to receive such data can you please look in to it and suggest any changes.

3.jpg

Thanks and Regards

Paras.

0 Likes
1 Solution
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hello Paras,

I tried recreating the issue at my end with your set up and was not successful. I got the results like 0xFFFF as expected. Could you make sure that you are reading the results after the conversion is completed.

ADC_IsEndConversion(ADC_WAIT_FOR_RESULT);

can be called before the result read after initiating a conversion.

One additional change I can suggest is the configuration you have chosen has an option of -noise signals in the results.

pastedImage_0.png

Instead of using this configuration, change the Vref to be VDDA/2 and Single ended negative input to Vref.

pastedImage_2.png

This should give you proper results.

Best Regards,

Vasanth

View solution in original post

0 Likes
3 Replies
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hi Paras,

Could you please share the channel tab screenshot in the ADC configuration window ? What is the resolution you have chosen for channel 0 there ? Is it 10 bits in that window ?

Best Regards,
Vasanth

0 Likes
PAB
Level 2
Level 2
First like given Welcome!

Hello

snap shot attached and also i am using PSOC 4 CY8C4245AZI-483 psoc Device.

pastedImage_1.png

pastedImage_3.png

Thanks

PARAS

0 Likes
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hello Paras,

I tried recreating the issue at my end with your set up and was not successful. I got the results like 0xFFFF as expected. Could you make sure that you are reading the results after the conversion is completed.

ADC_IsEndConversion(ADC_WAIT_FOR_RESULT);

can be called before the result read after initiating a conversion.

One additional change I can suggest is the configuration you have chosen has an option of -noise signals in the results.

pastedImage_0.png

Instead of using this configuration, change the Vref to be VDDA/2 and Single ended negative input to Vref.

pastedImage_2.png

This should give you proper results.

Best Regards,

Vasanth

0 Likes