-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADC_Module::checkDifferentialPins(uint8_t pinP, uint8_t pinN) always fails on Teensy 3.6 #17
Comments
I'll have a look at it on the weekend. Can you post an example of that problem? Also what versions of the ADC library, Teensyduino and Arduino are you using? |
Arduino-1.6.11 From ADC_Module.cpp (I suspect the issue is with ADC_MAX_PIN check in checkDifferentialPins as differential pin numbers do exceed the limit its trying to enforce despite the fact they are valid pins on the Teensy 3.6: //////////////// INFORMATION ABOUT VALID PINS ////////////////// // check whether the pin is a valid analog pin
} // check whether the pins are a valid analog differential pins (including PGA if enabled)
// return false; // all others are invalid
// fail_flag |= ADC_ERROR_WRONG_PIN;
// return false;
} /##################################################
#include <ADC.h> ADC *adc = new ADC(); // adc object void setup() {
} int value2 = ADC_ERROR_VALUE; void loop() {
} |
I just pushed an update in the dev branch. I think tt fixes these problems, however my Teensy 3.6 board is an early prototype and doesn't have access to the A10, A11 pins (and hence no differential). |
Fixed with the last commit. |
The bool ADC_Module::checkDifferentialPins(uint8_t pinP, uint8_t pinN) always sets error flag ADC_ERROR_WRONG_PIN on Teensy 3.6. I tried every combination of pin numbers and ADCs and this function always sets this error. I commented out all the returns and error flag setting and it now reads a voltage just fine.
The text was updated successfully, but these errors were encountered: