How do I calculate sampling rate of external ADC? 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!
Easy.


Based on your set up, figure out the spi speed.
Take a look at the adc datasheet, figure out it's frame of transmission . Aka how many pulses per frame / sampling.
The product of the numbers in 1 and 2 gives you the minimum time per frame. The inverse of it is the maximum transmission in your application. That speed is cap by the devices own max sampling rate (100ksps).
Your actual sampling rate will depend on your specific application but it should not go above the number obtained in 3.
You may need to factor in other timing requirements as well so read the datasheet carefully. But the gist is the same.