Wierd problem with analogRead(26,27,28) when using audio library

Status
Not open for further replies.

infibit

Member
Hello,

I am using the audio library for my project. But I have a problem. Many people in the forums suggested that when using audio library A0-A14 will not be available to use so I am using A15,16,17. But the value I get from A15,A16,A17 maxout when I use the audio library.Without the audio library they dont max out. Actually when I reset teensy it seems to be floating but when I move the teensy pcb a bit it maxes out. This problem is not there when I am not using the audio library. What is wierd is only when using audio library when I move the board the analogRead gives maxed out value. Not when not using audio library.What shall I do?
 
The audio library configures the ADCs to use the lower noise internal 1.2 Vref. So the signal range is 0 to 1.2V, not the usual 0 to 3.3V.
 
Can I modify the audio library to use the usual 0 to 3.3vref? How shall I do this? Where do I have to make changes. Can the audio library not work with 3.3 Vref?
 
I see that analogReference function does this in the input_adc.cpp file. I will have to set it to EXTERNAL I guess to get 3.3V Vref.
 
Status
Not open for further replies.
Back
Top