AnsweredAssumed Answered

ADC channel and setup on KDS

Question asked by Nelson Lobo on Sep 15, 2015
Latest reply on Feb 15, 2018 by sreejith menon

Hi,

 

Currently using the FRDM-KL25Z revE board on KDS3.0 platform using KSDK1.2.0 package.

 

Been trying the following adc programs:

1.Demo Examples:

     a.adc_hw_trigger

     b.adc_low_power

     c.dac_adc_demo_frdmkl25z

2.Driver Examples

     a.adc16

 

Unable to understand what channel adc is tied to. As in which PIN no.

For instance in adc_hw_trigger(lptmr):

#define ADC_INPUT_CHAN    (kAdc16Chn23) /* default input signal channel */

Could some one please point out which pin.

For example: kAdc16Chn23 = PTB0(assuming)

 

In demo example "a.adc_hw_trigger(lptmr/pit)" how do i use the internal DAC to generate the sample signals onboard? How do i use the macro USE_DAC_OUT_AS_SOURCE in the code to activate the DAC feature to generate the wave?

 

Also could someone please provide a simple ADC code for the KL25Z using a Potentiometer as done here :Tutorial: ADC with the Freedom Board | MCU on Eclipse

 

Regards,

Nelson

Outcomes