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
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.