I needed a digital I/O pin on my current T3.5 project, and more or less randomly selected Pin 28 from among the unassigned pins available. However, when I tried to use it to detect when a normally grounded circuit was broken (power plug mating with power jack), I couldn't get it to work. So, after tearing what's left of my hair out for a while, I discovered that on this particular Teensy 3.5, Pin 28 doesn't respond the same as adjacent (i.e. pins 29-32) ones.
Here's a very short Teensy 3.5 program to demonstrate the issue:
And here is some output:
I tested each pin by connecting it to ground via a jumper - otherwise each pin was left open-circuited. So, out of the five pins I tested, the only one that DOESN'T behave is the one I chose for my project - go figure
So, do I have a blown port on this Teensy, or is there something else going on?
TIA,
Frank
Here's a very short Teensy 3.5 program to demonstrate the issue:
Code:
/*
Name: T35_PIN28_DEMO.ino
Created: 11/23/2021 4:08:28 PM
Author: FRANKNEWXPS15\Frank
*/
void setup()
{
pinMode(32, INPUT_PULLUP); //goes HIGH when chg cable connected
pinMode(31, INPUT_PULLUP); //goes HIGH when chg cable connected
pinMode(30, INPUT_PULLUP); //goes HIGH when chg cable connected
pinMode(29, INPUT_PULLUP); //goes HIGH when chg cable connected
pinMode(28, INPUT_PULLUP); //goes HIGH when chg cable connected
}
void loop()
{
Serial.printf("%d\t%d\t%d\t%d\t%d\n", digitalRead(32), digitalRead(31), digitalRead(30), digitalRead(29), digitalRead(28));
delay(200);
}
And here is some output:
Code:
Opening port
Port open
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 0 1
1 1 1 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1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
0 1 1 1 1
Port closed
I tested each pin by connecting it to ground via a jumper - otherwise each pin was left open-circuited. So, out of the five pins I tested, the only one that DOESN'T behave is the one I chose for my project - go figure
So, do I have a blown port on this Teensy, or is there something else going on?
TIA,
Frank