Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: Getting continuous ADC data to a PC?

  1. #1
    Junior Member
    Join Date
    May 2020
    Posts
    2

    Getting continuous ADC data to a PC?

    I spent much time reading on the forum and found several discussions how to acquire fast analog data with the Teensy.
    What I have not found is how to pump those data up to a computer. For an oscilloscope-like application (only finite chunks of data) it would be simple.
    However, I need a sustained ≥100 ksps "stream" of ≥12bit ADC values. Even the Teensy 3.2 can do the ADC (even with 16bit and the added benefit of a PGA) but can it handle the transfer at the same time? What is the best way to get the data transferred up? Both, USB and ethernet should be possible, but which is preferable and why?

    Pretty clearly the data need to be buffered (although I probably could forgo handshaking and resubmit for a point-to-point connection, so UDP or USB-isochronous mode are options).
    Can anybody point me to a relevant thread or project? Are there any reasons a Teensy would not be a good solution? And could it all be done with the Arduino IDE?

    Thanks!

  2. #2
    Junior Member
    Join Date
    May 2020
    Posts
    1
    I was about to post a very similar question. In my case, about 5 MByte/sc of samples from external SPI ADC. (and maybe SD card logging too)

  3. #3
    Member
    Join Date
    Feb 2020
    Location
    Dublin, Ireland
    Posts
    26
    Hi,
    I don't have the answers to some of your questions, but, with a Teensy 4.0, I can reliably send 18 byte chunks 50,000 times per second over Serial USB. My data is coming from an external ADC which prevents me trying anything faster than that without changing my code - and I've no need for higher speed in my application. I'm just using Serial.write to send the data - nothing complicated. I've a C# program (in Windows 10) that continuously plots the data.

  4. #4
    Junior Member
    Join Date
    May 2020
    Posts
    2
    @AlanK
    that sounds close to what I need. How do you read the ADC? SPI?
    Would you mind sharing your code and which ADC you are using?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •