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

Thread: Analogue to digital within the Teensy

  1. #1
    Junior Member
    Join Date
    Mar 2017

    Analogue to digital within the Teensy

    The Arduino has a 10 bit analogue to digital convertor and I think I read the Teensy 3.2 has a 16 bit convertor - (Is this right) and if so does that mean conversions
    would be different.

    For instance a project I done I had to have (1023 represents 5 volts) and anything less was a ratio

  2. #2
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Ayer Massachussetts


    The default for Teensy 3.x/LC is 10 bits, which is the same as classic Arduino systems (i.e. values are in the range 0..1023). There is a function to increase the precision to 16 bits, but as Paul stresses, that generally above 12 bits, the bottom bits are essentially random without a lot of careful control.

    Note, Teensys are 3.3v, so analogRead will not read anything above 3.3v.

    If you feed the special analog only pins (i.e. A10-A14 on a Teensy 3.2, A10-A11 and A20-A24 on Teensy 3.5/3.6) you will risk destroying the Teensy. Similarly if you feed more than 3.3v to any analog pin on the Teensy LC or 3.6, you risk destorying it. On the Teensy 3.2 & 3.5 you can feed 3.3v to 5v to the pins that can also do digital read/writes, but the analogInput will only return the 3.3v value for higher voltages.

    If your device must take 5v input, you will need to use a voltage divider to reduce the voltage from 0..5v to 0..3.3v to get accurate readings.

    If your device can take 3.3v or 5v, just hook up 3.3v to the power, and analogInput will return 0..1023 just like an Arduino by default.

  3. #3
    Junior Member
    Join Date
    Mar 2017
    Ahh ...... that makes sense thanks for your response

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts