ADC throwing illogical numbers.

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

cross mob
Anonymous
Not applicable

I am trying to run the adc_scan_polling_sw example on a FM4-176L-S6E2CC-ETH board kit but it is giving me some strange values on the terminal I/O; e.g. if I use channel 16 I get 268370192 for 5 V and 272 for 0 V. Similarly, if I try for instance channel 4 I get 268370180 for 5 V and 260 for 0 V. Notice that the difference between those values is proportional to the difference in the number of the channels (16 - 4 = 12), pretty strange...

From my understanding, I should get 4096 for 5 V since it is a 12 bit conversion. Also I was trying to show the values into another terminal like PuTTY, but with no success either.

Any help would be really appreciated.

0 Likes
3 Replies
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello,

Could you please share your project.

Thanks,

P Yugandhar.

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Find attached the project. I added some UART configuration also but somehow it says that Mfs_Uart_Init (currently commented) is not defined (even if mfs files are included and there is actual definition) . I am using IAR Embedded Workbench.

Thanks for the help.

0 Likes
Yugandhar
Moderator
Moderator
Moderator
500 solutions authored 1000 replies posted 5 likes given

Hello,

Can you please resend the project. In the PSoC Creator, go to File ->Create Workspace Bundle -> Select minimal. Please attach the generated file.

Thanks,

P Yugandhar.

0 Likes