Problem with ADC

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

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hello everybody. I 'm trying to learn about ADC converter in PSOC using CY8CKIT-049-4xxx. I made a simple test by using a pot. However there are a few problems:

1. I never get 2047 on 3.3v. I get around 1375 counts.

2. I didn't figure how to use ADC_CountsTo_Volts function. When I call it it returns nothing - or at least this is what see on Uart Termonal.

Please see the attached files.

Thank you in advance

0 Likes
1 Solution
Anonymous
Not applicable

Hi all.

I finally managed to find the answer. And the board works now as expected.

According to the datasheet of the kit (page 63) VDDD and VDDA are tied together to VDD. In my case - the kit is powered from USB - VDD is 5V.

In PSoC Creator in "Design Wide Resources - System " VDDA and VDDD were set to 3.3V. By changing to 5.00V the problem is solved.

Thanks again everybody for help.

View solution in original post

5 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

To print a float set in System view the heap size to 0x0200

Bob

0 Likes
Anonymous
Not applicable

Thank you for your answer.

Unfortunately it did not work.

I changed the CY8CKIT-049-4xxx with CY8CKIT-042 and now i'm able to read full scale. Maybe a faulty board? Don't know.

After I debugged the project now I know that ADC_CountsTo_Volts() function returns the correct value.

I have another question:

In datasheet is stated that ADC_IsEndConversion(ADC_WAIT_FOR_RESULT) "Does not return a result until the ADC conversion of all sequential channels is complete". What is the best way to use this function?

Again, thanks for your help.

0 Likes
Anonymous
Not applicable

Hello. What is your vref? 1.024v internal or vdd to vss?. And for float operation projrct build-linker float none must be true and also heap size must be 0x0200.

0 Likes
Anonymous
Not applicable

Hi.

Vref is 3.3V, so the range is VDAA to VSS.

0 Likes
Anonymous
Not applicable

Hi all.

I finally managed to find the answer. And the board works now as expected.

According to the datasheet of the kit (page 63) VDDD and VDDA are tied together to VDD. In my case - the kit is powered from USB - VDD is 5V.

In PSoC Creator in "Design Wide Resources - System " VDDA and VDDD were set to 3.3V. By changing to 5.00V the problem is solved.

Thanks again everybody for help.