Differential analog read on Teensy 3.5 pins A12/A13: "ADC1: Wrong pin" error
I'm trying to perform a differential analog read with the ADC library using pins A12 and A13 of a Teensy 3.5 plugged into a solderless breadboard. I'm using Teensyduino 1.53 and the latest version (from Github) of the ADC library at http://https://github.com/pedvide/ADC.
In order to test the differential read in the simplest possible way, I connected a jumper wire between A12 and A13 (so that the pins were shorted together). Aside from the USB connection to my Macbook Pro, there were no other connections made to the Teensy. I then ran the example analogRead.ino at http://https://github.com/pedvide/ADC/blob/master/examples/analogRead/analogRead.ino, but the results weren't what I expected. A sample of the serial monitor output follows:
I expected the readings from pins 23, 16, and A10-A11 to fluctuate because those pins were floating, but I expected the value for A12-A13 to be 0. Moreover, I don't understand why I got the "ADC1: Wrong pin" error.
Does anyone have suggestions of next steps I could take to figure out what's going on, or am I making an elementary mistake? This is not a new Teensy and has been used for other projects in the past; is it possible that there's a hardware problem with my board? Thanks in advance for your help.
I'm trying to perform a differential analog read with the ADC library using pins A12 and A13 of a Teensy 3.5 plugged into a solderless breadboard. I'm using Teensyduino 1.53 and the latest version (from Github) of the ADC library at http://https://github.com/pedvide/ADC.
In order to test the differential read in the simplest possible way, I connected a jumper wire between A12 and A13 (so that the pins were shorted together). Aside from the USB connection to my Macbook Pro, there were no other connections made to the Teensy. I then ran the example analogRead.ino at http://https://github.com/pedvide/ADC/blob/master/examples/analogRead/analogRead.ino, but the results weren't what I expected. A sample of the serial monitor output follows:
Code:
Pin: 23, value ADC0: 0.6543099284
Pin: 16, value ADC1: 2.9335682392
Value A10-A11: -0.2472419246
Value A12-A13: -3.5248339555
ADC1: Wrong pin
Pin: 23, value ADC0: 0.2376241684
Pin: 16, value ADC1: 2.9584434032
Value A10-A11: -0.4882398576
Value A12-A13: -3.5248339555
ADC1: Wrong pin
Pin: 23, value ADC0: 0.7244037390
Pin: 16, value ADC1: 2.9433369637
Value A10-A11: -0.1721126066
Value A12-A13: -3.5248339555
ADC1: Wrong pin
Pin: 23, value ADC0: 0.7431860566
Pin: 16, value ADC1: 2.9444448948
Value A10-A11: -0.2579171360
Value A12-A13: -3.5248339555
ADC1: Wrong pin
I expected the readings from pins 23, 16, and A10-A11 to fluctuate because those pins were floating, but I expected the value for A12-A13 to be 0. Moreover, I don't understand why I got the "ADC1: Wrong pin" error.
Does anyone have suggestions of next steps I could take to figure out what's going on, or am I making an elementary mistake? This is not a new Teensy and has been used for other projects in the past; is it possible that there's a hardware problem with my board? Thanks in advance for your help.