Teensy 4.1 and ADS1115

hbear

Member
Hi,
I know a number of people have raised the issue of the ADS1115, but I have a basic question. I want to read a set number of values on the first channel of the 1115 ADC where the source is a 0-1 volt 10Hz sine wave supplied by a Teensy 3.2 via the DAC pin. What I need help with is how to set up code in the 4.1 to read channel 0 (single - sided) as fast as I can into an integer array in the Teensy 4.1 and display the data (hopefully a sine wave!) after the run. At present I am sampling 500 times so I can view the entire run in the Arduino plotter.
I have tried the Adafruit library along with a couple of others and what I end up with is a ~30 second lag between the beginning and end of the run. My serial rate is 9600 baud, but this should not affect the sampling rate as I am not carrying out any serial output during the data collection run (the sampling run and the plot are in different subroutines).
In short, what minimum set of commands do I send to the ADC to put it into a mode where it samples as fast as it can (860 s/sec?), and allows me to ask for samples in code at a rate commensurate with what the ADC can deliver.
I'd provide a couple of code examples but they have to be completely incorrect to produce such horrible results.
I want to add that I have run a similar test with the Gravitech I2CADC (+ Teensy 4.1 and 10 Hz sine wave input) and have received a decent sine wave with an effective sampling rate of over 2000/sec.
 
Back
Top