Forum Rule: Always post complete source code & details to reproduce any issue!
-
12 Bit ADC in Teensy LC
Hi Guys,
I'm currently working on a music instrument based on the Teensy LC. In the Teensy overview I see that it has 13 Analog Ins with a resolution of 12 bits. When reading sensor data however, I'm only able to get values between 0 - 1023, or 10 Bit. How could I use the full 12 bit ADC capabilities of the Teensy? FYI, I'm using the Arduino IDE to program the Teensy.
Kind regards,
YBR
-
Senior Member
Analog read defaults to 10 bit resolution. Call analogReadResolution(bits) to change it. Also, it's the "effective" resolution that would be in the 12-13 bit range, due to noise. The analog to digital converter is 16 bit.
Brian
-
Senior Member
Yup, use analogReadResolution(12). You might also try analogReadAveraging(8) or even analogReadAveraging(32).
Also consider your analog circuitry. Low signal impedance is needed to actually achieve low enough noise to really use 12 bits.
-
Thanks for the help, wasn't aware of that one!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules