Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: 12 Bit ADC in Teensy LC

  1. #1
    Junior Member
    Join Date
    Nov 2016
    Posts
    9

    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

  2. #2
    Senior Member brtaylor's Avatar
    Join Date
    Mar 2016
    Location
    Portland, OR
    Posts
    539
    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

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,821
    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.

  4. #4
    Junior Member
    Join Date
    Nov 2016
    Posts
    9
    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
  •