user37801: I am wondering if someone could explain this to me.
I want to calculate sampling rate of external ADC.
I am using ADS8320 which has max sampling rate of 100kHz, with Arduino MEGA 2560.
SPI divider is set to 128, which makes SPI frequency 125kHz.
Baud rate is 115200 (I am not sure if this is important).
Thanks a lot!

user28658: To get an idea of the sampling rate write a loop that takes 10,000 measurements and time how long it takes. You have your sample rate, not perfect but gives you some idea.
long start = millis();
// the loop

Serial.print( 10000000/(millis() - start) );  
Serial.println(" samples per second");


37801: <p>I am wondering if someone could explain this to me.</p>

<p>I want to calculate sampling rate of external ADC.
I am using <a href="http://www.ti.com/lit/ds/symlink/ads8320.pdf" rel="nofollow noreferrer">ADS8320</a> which has max sampling rate of 100kHz, with Arduino MEGA 2560.
SPI divider is set to 128, which makes SPI frequency 125kHz.
Baud rate is 115200 (I am not sure if this is important).</p>

<p>Thanks a lot!</p>
 28658: <p>To get an idea of the sampling rate write a loop that takes 10,000 measurements and time how long it takes. You have your sample rate, not perfect but gives you some idea.</p>

<pre><code>long start = millis();
// the loop

Serial.print( 10000000/(millis() - start) );  
Serial.println(" samples per second");
</code></pre>
