I've seen mention of "continuous mode" and "continuous measurements" but can't seem to find what it is, why I would want it, or how to use it. I have browsed through the thread at: https://forum.pjrc.com/threads/25532-ADC-library-update-now-with-support-for-Teensy-3-1 but I'm not getting it.
Is there something like the Arduino Reference page for continuous mode and other Teensy-specific functionality?
To provide some background, I have a project in which I have six external waveforms that I wish to measure using my Teensy 3.6. When an interrupt occurs, I want to "look back" at the history of these waveforms and pick some specific points from the array of values for each one. Yes, my life would be much easier if the interrupt signal happened first and I could just start logging data at that point, but the design of these waveforms and signals is not in my control.
At the moment, I'm just using an analogRead in the main loop to constantly write the current measurement into an array after shifting all the existing values first. My concern is that the exact time these values go into the array may not be constant since the number of CPU instructions per loop can change due to a variety of conditional statements. I'd prefer to use modulo and micros() to take a sample every 25 microseconds, but this method seems to miss some measurements based on a side-by-side with my oscilloscope. My goal is to have six buffers/arrays of data to always contain the last 3ms of analog measurements in 25 microsecond increments.
Whether "continuous mode" helps me or not, I'd like to know more about it. Thank you in advance for any explanation.
DPM
Is there something like the Arduino Reference page for continuous mode and other Teensy-specific functionality?
To provide some background, I have a project in which I have six external waveforms that I wish to measure using my Teensy 3.6. When an interrupt occurs, I want to "look back" at the history of these waveforms and pick some specific points from the array of values for each one. Yes, my life would be much easier if the interrupt signal happened first and I could just start logging data at that point, but the design of these waveforms and signals is not in my control.
At the moment, I'm just using an analogRead in the main loop to constantly write the current measurement into an array after shifting all the existing values first. My concern is that the exact time these values go into the array may not be constant since the number of CPU instructions per loop can change due to a variety of conditional statements. I'd prefer to use modulo and micros() to take a sample every 25 microseconds, but this method seems to miss some measurements based on a side-by-side with my oscilloscope. My goal is to have six buffers/arrays of data to always contain the last 3ms of analog measurements in 25 microsecond increments.
Whether "continuous mode" helps me or not, I'd like to know more about it. Thank you in advance for any explanation.
DPM