Faster ADC?

Status
Not open for further replies.

scandrew

Member
Hi,

Is there an easy way to speed up the analog to digital conversion on Teensy 3.1? I can't seem to find a simple solution. I know this chip is capable of fast conversion, but don't know how to access it. At the moment I am using analogRead(). All i need is to double the speed of ADC. That would help me a lot.
Thank you.
Andrew
 
Thanks for the reply Headroom. I saw these links, and others. I don't believe any of them really answer my question. Pedro's ADC library seems to be too big and complex, with 1600 lines of code.
I was hoping to keep using analogRead() function , but perhaps access some registers to speed it up. I know the chip is capable of fast ADC. Was wondering if there was a simple solution. Yes there have been many questions and answers, but so far I wasn't able to find an simple elegant solution.
 
Lower resolution and no averaging will increase the speed substantially, independent of whether you use the standard functions or the ADC library.
 
Lower resolution and no averaging will increase the speed substantially, independent of whether you use the standard functions or the ADC library.

I lowered the resolution with analogReadResolution(), but do you know how I can change the averaging if I use standard library? Also wondering what the averaging is by default.
Thanks
 
Fantastic!!! This is exactly what I was looking for. Thanks a lot Pedro!
Changing averaging to 0, analogReadAveraging(0) doubled the conversion rate for me. I was already using 8 bit resolution.
Simple way to speed up the ADC with just 2 lines of code, provided that high accuracy is not required

analogReadResolution (8); //8 bit ADC resolution
analogReadAveraging(0); //0 averaging
 
Status
Not open for further replies.
Back
Top