ADC using PE not working

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

ADC using PE not working

931 次查看
Amit_Kumar1
Senior Contributor II

Hi

I am using FRDM-K20D50M board with codewarrior10.5 along with PE. I have used ADC_LDD component from PE and I am trying to print the values on UART using Console_IO. I have written the code I don't know why it is sending out only '0' as output, I have tried connecting the ADC pin with 3.3v , 0v, and also left it open but it is giving the same value ' 0 '  kindly have a look on the attached program. I think this is supposed to be one of the simplest program and made me wonder why it is not working. Thanks in advance

Kind Regards

Amit Kumar

3 回复数

618 次查看
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Amit:

Did you forget to attach the project?

Regards!

Jorge Gonzalez

0 项奖励

618 次查看
Amit_Kumar1
Senior Contributor II

Hi Jorge

Sorry for the inconvenience. Last time the project didn't get attached. Please check the attachment in this msg. Thanks

Kind Regards

Amit Kumar

0 项奖励

618 次查看
jch
NXP Employee
NXP Employee

Hi Amit,

I went through your code and I found that you didn't select channel to be measured, before calling the StartSingleMeasurement() method.

For this please use the CreateSampleGroup() or SelectSampleGroup() method. You can find more info on right click of the component-> Help on component -> Typical Usage page.

CreateSampleGroup() - is used for the runtime preparation of the sample group, while SelectSampleGroup() is used to select sample group from prepared in the Property tab ->Static sample group.


Best regards

Jiri