Analogue to digital within the Teensy

Status
Not open for further replies.

RICHIE888

Member
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 :confused:
 
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.
 
Status
Not open for further replies.
Back
Top