Go Down

Topic: A/D sampling frequency (Read 2706 times) previous topic - next topic

DanRek

Since the Clock frequency is 84 MHz, I'd like to know if it is possibile to have an A/D sampling frequency of minimum 100KHz.
Thank you very much.

ralphnev

all the way up to 1M sample/sec

MarkT

That's what the hardware can support, analogRead() out of the box takes 39us
[ I won't respond to messages, use the forum please ]

DanRek

Ok, then the maximum sampling rate is 1 MHz?

Gericom


Ok, then the maximum sampling rate is 1 MHz?

Yes, but only under perfect conditions.
Subscribe my youtube channel: http://www.youtube.com/user/MKDS3

DanRek

How can I reach 100Ksps if the AnalogRead() takes 39us? ...

ralphnev

RTFM
      Search & Read the forums  - people have talked about this before 
      may people have posted code (myself included)

     my favourite way is use the PDC
     others favour  tight loops after modifying the analog read command
     others rewrite the analog read
     

Gericom


How can I reach 100Ksps if the AnalogRead() takes 39us? ...

Use native code. Take a look over here: http://asf.atmel.com/docs/latest/sam3x/html/group__sam__drivers__adc__group.html
Subscribe my youtube channel: http://www.youtube.com/user/MKDS3

DanRek


RTFM
      Search & Read the forums  - people have talked about this before 
      may people have posted code (myself included)

     my favourite way is use the PDC
     others favour  tight loops after modifying the analog read command
     others rewrite the analog read
     



May you link me the FM you say in "RTFM"? Thanks.

ralphnev

http://www.atmel.com/Images/doc11057.pdf


MarkT

For the record my previous timing for analogRead() was with 1.5.4.

I've now installed 1.5.5 and the speed has increased dramatically (as the release notes
state), getting between 2.0us and 3.3us for analogRead() now.

Interestingly the slower case was consecutive reads of analog pin 0, whereas
reading analog pins 0 to 9 in turn was quicker...  Done with an unrolled loop
of 10 consecutive analogreads.
[ I won't respond to messages, use the forum please ]

DanRek


For the record my previous timing for analogRead() was with 1.5.4.

I've now installed 1.5.5 and the speed has increased dramatically (as the release notes
state), getting between 2.0us and 3.3us for analogRead() now.

Interestingly the slower case was consecutive reads of analog pin 0, whereas
reading analog pins 0 to 9 in turn was quicker...  Done with an unrolled loop
of 10 consecutive analogreads.


Very nice ... May you can give an example of your unrolled loop of 10 consecutive analogRead() code?
Thank u very much.

MarkT

You need an example of 10 analogRead()'s in a row?
[ I won't respond to messages, use the forum please ]

DanRek

Yes ... You'd be very kind

Go Up