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

Thread: code for fast ADC reading on a T3.6?

  1. #1
    Junior Member
    Join Date
    Dec 2019
    Posts
    9

    code for fast ADC reading on a T3.6?

    I'm trying to log 8 channels at a rate of 10kHz, and I want the data to be 12 bit (as mentioned in another thread).

    I'm a noob at coding and looking for help with this.

    this arduino forum thread has some library where people were claiming to get up to 40kHz on a single analog channel:

    https://forum.arduino.cc/index.php?t...i7DqYYJMuFkP50

    https://github.com/greiman/SdFat/blo...gBinLogger.ino - here is the code.


    the T3.6 should be able to clock to clock 8 channels*12 bit data*10kHz. Does anyone know of a existing code that would help me achieve this rate? I'm a coding beginner so writing something as comprehensive as the code in the Github library isn't really on the cards. I don't really know much about buffers etc. and how to execute them on microcontrollers.

  2. #2
    Junior Member
    Join Date
    Dec 2019
    Posts
    9
    bump, surely someone on this forum has an answer, I thought this would be the best place to ask regarding T3.6 code. I'd really appreciate the help

  3. #3
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    17,433
    Multi channel at high rates isn't something I recall as posted. It would take the person having done it or interested in working it out to login and see the post.

    It would take some special effort if possible given the timing - cycling 4 pins for single reads on each of two ADC channels might be the closest if the reads could overlap/parallel.

  4. #4
    Junior Member
    Join Date
    Dec 2019
    Posts
    9
    Quote Originally Posted by defragster View Post
    Multi channel at high rates isn't something I recall as posted. It would take the person having done it or interested in working it out to login and see the post.

    It would take some special effort if possible given the timing - cycling 4 pins for single reads on each of two ADC channels might be the closest if the reads could overlap/parallel.
    I thought that theoretically though that data rates on 1 channel one could do up to like 100k in read speed. It's just getting the buffer and the multiple channels..

    I thought there might be readily available code that requires slight modification to suit needs. There is such code for Arduinos that is almost good enough for my needs however the hardware of arduinos probably isn't quite up to it. If there is a not too compilcated teensy solution that would be great, otherwise opting for an Arduino may be the way to go.

    here is the Arudino version:

    https://forum.arduino.cc/index.php?topic=228549.0

    and I think the associated code:

    https://github.com/greiman/SdFat/blo...gBinLogger.ino

  5. #5
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    11,786
    Sorry not at my desk right now,

    But as mentioned, there may be solutions, but other than @PaulStoffregen we are all just users like you.

    There are many of us who like to help. Suggestion, you might show you have taken an initiative and mention things you have tried, like have you tried any examples inADC library? Could you get fast enough samples?

Posting Permissions

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