ADC too slow, how to pump it up?

Hello everybody!

I need to do some signal processing and i thought that Arduino Zero would be perfect since its computation power :slight_smile: , but when i try to use the ADC "AnalogRead();" the sampling rate it's about 2.3 kHz.
About ~430us per sample. :frowning:

Since the clock it's 48MHz i expected a much higher sampling rate, not just 2.3kHz .

Looking in the web i found a code where someone implement a DMA apporach to the problem and reached a 2us per sample ~500kHz !

The problem is that not only that is way too fast for my application, but it's an instable code and at some point it saturate the read value to the top, or oscillate between 1024-0 in a foolish way.

Isn't there a halfway to solve the problem?

Moreover the machine-Levell coding it's quite enigmatic.

i also found some resources on the atmel website about DMA, but in truth there is no code!

http://asf.atmel.com/docs/latest/samd21/html/asfdoc_sam0_adc_dma_use_case.html

can someone help me through this? :confused:

Hi,

I have been down this road too! We had some discussions about this on the board and I managed to get the single conversion time down to 6 ยตs with stable result. It needs one works directly with the registers. Free conversions with DMA can be faster. The discussions are at: Faster Analog Input - Arduino Zero - Arduino Forum

I do hope this is of some use.

Harry J. Whitlow