LabVIEW Embedded

cancel
Showing results for 
Search instead for 
Did you mean: 

Maximum ADC sampling frequency with EK-LM3S8962

Hi,

I am wandering which is maximum sampling rate of internal ADC of ARM board EK-LM3S8962.

 

In fact,  if I use block "analog input elemental I/O":

- in a timed loop, I can reach 1 kHz max;

- in a standard while loop,  I measured sampling rates up to 200 kHz.

 

I have also tried to use an interrupt generated by a Timer:

- when I use "milliseconds" as counting unit of measurement, it works well;

- when I use "ticks" as counting unit of measurement, the VI is compiled and downloaded to target but it does not work.

 

So, my question is: I have proven that sampling rates greater than 1 kHz are allowed by   EK-LM3S8962 board, but how I can choose precisely such a frequency?

 

I am awaiting for a helpful reply...

Regards,

Mario Luiso. 

0 Kudos
Message 1 of 6
(8,184 Views)

Hey Mario,

 

with a timed loop is normal that you can't go over the 1 kHz frequency because it is based on System Clock so you have to use while loop.

 

However you can't be able to precisely know the ADC conversion frequency.

 

Cheers,

Mat

 

 

Matteo Brunella
Application Engineer
NI Italy
0 Kudos
Message 2 of 6
(8,170 Views)

Dear Mat,

 

thanks a lot for your kind reply.

 

In order to have and to control ADC sampling frequencies over 1 kHz,  may I use interrupts driven by a timer?

 

I tried to do so. Anyway it works only if I choose "milliseconds" for counting unit of measurement (i.e. the same of using timed loops, as you said); if I choose "ticks", the VI is compiled and downloaded to ARM flash but it doesn't work.

 

May you help me?

 

Regards,

Mario Luiso. 

0 Kudos
Message 3 of 6
(8,165 Views)

Hi Mario,

 

I suggest you to use timer...

 

see you soon

 

Mat

Matteo Brunella
Application Engineer
NI Italy
0 Kudos
Message 4 of 6
(8,155 Views)

How many ticks do you have the interrupt configured?  If it is firing too fast, the code in your main VI may never execute because the interrupt is firing so fast that your program will only execute interrupt code.

 

Try increasing the number of ticks.  That seemed to work for me, but this will be dependent on the code that you are executing in the interrupt.

 

I also did some math and it seems 1 tick is approximately 142nS

0 Kudos
Message 5 of 6
(8,126 Views)

Hi,

 

I'm trying to get a higher sampling rate on my LM3s8962, and have read all of the forums, until I found yours, and still have hope.  Is there any chance either of you could attach your LV project, so I could use it as a baseline to work on mine?  any hlep would be much appreciated.

0 Kudos
Message 6 of 6
(6,266 Views)