ADC using PE not working

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ADC using PE not working

1,216 Views
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 Replies

903 Views
Jorge_Gonzalez
NXP Employee
NXP Employee

Hello Amit:

Did you forget to attach the project?

Regards!

Jorge Gonzalez

0 Kudos
Reply

903 Views
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 Kudos
Reply

903 Views
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