Teensy4 ADC Word Size

Status
Not open for further replies.

joebobs0n

New member
I'm currently working on redesigning a project that utilizes the Teensy 3.2 to use the Teensy 4. The Teensy 3.2 in my design is used for analog data collection, as well as a number of other things. Pins A10 and A11 are currently being used as they support 16b analog acquisition. On the Teensy 4, which pins support 16b word length?
 
For anyone interested, I did some testing with the Teensy 4 I just got in, and none of the ADC pins are 16b. All of them are 12b.
 
Yes I did. Here's the code I used to test it.

Code:
#define READ_PIN A0

void setup() {
	analogReadResolution(16);
	analogReadAveraging(32);
}

void loop() {
	Serial.println(analogRead(READ_PIN));
	delay(1000);
}

It's not an elegant way of figuring it out, but it did the job. Basically, I manually changed the analog read pin in the code, uploaded the sketch, and then connected the pin under test to 3.3V.

Watching the serial monitor, it would read out a maximum of 4096 (2^12) instead of the expected 65536 (2^16).
 
Status
Not open for further replies.
Back
Top