I recently succeeded in receiving ADC Data from ADS7851 through SPI communication. Now I'm working on plotting those voltage data and also fft of them. I've done some research, and found out that matplotlib and PyQt UI is too heavy and slow to plot 1.5MSPS of data coming in. Therefore I concluded using pylab and Tkinter is efficient for my purpose.

I've made a function "readADC", which returns single realtime voltage value. Inside Tkinter, readADC and pylab should run simultaneously. I'm afraid that plotting algorithm might slow down the clock speed, or even worse, ruin the fft pattern. What is the best approach to do this?


above is the basic concept I intend, of which the realtime voltage passes through. FFT graph should be shown on sperate canvas widget.

I'll be very glad to receive any advice(approach/tools/codes). Thank you.

  • If your current working solution resembles the one in your first question it would be nice for follow-up readers to know what made it working.
    – LotPings
    Aug 21, 2017 at 10:20
  • Oh, I did comment but I agree that I should state it clearly. It was solved by wiring Vref_out port voltage below the half of AVDD and also initializng and setting CS high after the call. Thanks
    – J.Daniel
    Aug 21, 2017 at 14:46
  • On a Pi2B using the standard Linux driver (and from Python as well) you are unlikely to get 20ksps, let alone 1.5Msps. The question may be moot.
    – joan
    Aug 21, 2017 at 15:25
  • Can you please comment a link to it? If that's true, I need to start over from the very beginning..
    – J.Daniel
    Aug 22, 2017 at 6:32
  • There is a problem between what signify for you "real time", what (usually) for other people and what you really need. Remember that our eyes (and brain) don't need more than 24 fps (oversemplified...)
    – user51705
    Aug 22, 2017 at 14:38


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.