Hello,
Im using the teensy 3.5. I have successfully been able to use the ADC and PDB together, by setting the PDB to 100kHz. Using my Func.Generator, I fed a 1khz sinewave into my ADC input.
And then tested output of ADC and used my oscilloscope by toggling a digital pin high/low in the adc_isr() and I do get a 100khz samplerate.Awesome!!!
I also saved this data to a SD card to look at in matlab,and if I feed a 1kHz sinewave with a ADC samplerate of 100kHz, I should see 100 samples per sinewave. And I do!Great!
But I decided to trying using the setAveraging() to see how smooth I could get the sinewave:
Now I thought if I average every 2 samples at 100kHz I should have a 50kHz samplerate,but I dont,I still have a samplerate of 100kHz.Using the methods above to test samplerate.
And dont get me wrong the signals are smoother,but im just wondering whats happening here? By setting the setAverage(2) just make the duration longer???
Kinda lost.
And ive also tried setting averaging from {2,3,4,5}
Im using the teensy 3.5. I have successfully been able to use the ADC and PDB together, by setting the PDB to 100kHz. Using my Func.Generator, I fed a 1khz sinewave into my ADC input.
HTML:
adc->adc0->stopPDB();
adc->adc0->startPDB(100000);
And then tested output of ADC and used my oscilloscope by toggling a digital pin high/low in the adc_isr() and I do get a 100khz samplerate.Awesome!!!
I also saved this data to a SD card to look at in matlab,and if I feed a 1kHz sinewave with a ADC samplerate of 100kHz, I should see 100 samples per sinewave. And I do!Great!
But I decided to trying using the setAveraging() to see how smooth I could get the sinewave:
HTML:
adc->adc0->setAveraging(2);
Now I thought if I average every 2 samples at 100kHz I should have a 50kHz samplerate,but I dont,I still have a samplerate of 100kHz.Using the methods above to test samplerate.
And dont get me wrong the signals are smoother,but im just wondering whats happening here? By setting the setAverage(2) just make the duration longer???
Kinda lost.
And ive also tried setting averaging from {2,3,4,5}