0

In the datasheet, the maximum clock frequency (when the ADC is powered with maximum voltage of 5V) is 3.6 MHz. Each read takes about 24 clock cycles which gives us a maximum sampling rate of about 150 KSPS. However, I have a couple of questions:

1) Why is it that the ADC is advertised to be a 200 ksps ADC when the theoretical maximum is about 150 KSPS?

2) Is the calculation that I have done correct?

Thank you!

  • The Raspberry Pi is pretty irrelevant to the question. – joan Aug 4 '17 at 6:01
1

You have made the assumption that 24 clocks are required. A quick look at the datasheet suggests 18 clocks are required per cycle. This gives a figure of 3600000 / 18 = 200000

The faulty assumption is that all devices require transfers in multiples of 8 bits.

  • Huh, interesting. But why is it then that when I use the following code: raspberrypi.stackexchange.com/questions/70314/… (I have actually modified it to store whatever reading I get in a list and then after the entire conversion, transfer all the data to a file, instead of writing to the file every time I read a value), powering the ADC with 5V, setting it to a max frequency of 3.6 MHz, I cannot achieve a sampling rate higher than about 41 KSPS? – Always Learning Forever Aug 4 '17 at 6:05
  • That code uses the Raspberry Pi Linux SPI driver which uses the Raspberry Pi hardware SPI peripheral which transfers bits in multiples of 8-bit bytes. I'm a little surprised you can reach 41 KSPS with Python. Was that a Pi3? – joan Aug 4 '17 at 8:00
  • I don't get it, why will it limit my ability to reach the sampling rate of, say, 150KSPS? Will switching to C help? Yes it was. – Always Learning Forever Aug 4 '17 at 8:06
  • Python is an interpreted language and some applications will be slower than those implemented in a compiled language such as C. See C SPI speed. – joan Aug 4 '17 at 8:12
  • Gotch ya, thank you so much! One more question: can I plugin more than one ADC into the Pi? I have successfully plugged in to in the CE0 and the CE1 pins and they work all right, however, I want to add more. – Always Learning Forever Aug 4 '17 at 8:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.