Read ADC with Timer ISR

cancel
Showing results for 
Search instead for 
Did you mean: 

Read ADC with Timer ISR

983 Views
trilokjt
Contributor III

Hi,

I'm trying to read external ADC on my MK60N512 board. Below are the following requirements

1 . Read ADC after every 50 ms (1 Channel)

2.  Read all channels of ADC s (2 No), 16 Channels( Total = 800 ms)

3.  In 1 Sec I need to read ADCs and send to LCD( in remaining 200 ms after reading all ADC channels ) 

4. Repeat the above process again

Please help me out to learn

Thank you

3lok

Labels (1)
0 Kudos
2 Replies

246 Views
marek_neuzil
NXP Employee
NXP Employee

Hello,

I suppose that you want to use KDS 3.0.0 and Processor Expert (a Kinetis project in KDS 3.0.0 with Processor Expert).

You can use ADC_LDD component to measure all ADC inputs (channels) you need and TimerUnit_LDD for timing of these measurements. The ADC device support also triggers from timer devices (PIT, Flex timer) and therefore you can trigger measurement of your channels by a timer. So you can select the sample group, enable the trigger (StartSingleTriggeredMeasurement method) and wait for the event (OnMeasurementComplete). Or you can also control ADC conversions directly by your application in a timer events (without trigger).

For details see the Help of these components. There is also section Typical usage that contains typical usage of the component's methods.

Best Regards,

Marek Neuzil

0 Kudos

246 Views
trilokjt
Contributor III

Okay, Thank you Sir.

0 Kudos