Teensy 4.0 pull-up?

Status
Not open for further replies.

aaronw

New member
I had a project based on the Teensy 3.2 which worked well. After migrating to the Teensy 4.0, however, I am no longer able to get the pull-up support to work. Does this work for Teensy 4.0? I'm using GPIOs 1-4, 8-12 and 14-16 as inputs for open-collector devices. Even though I have configured these pins as INPUT_PULLUP, I do not measure any voltage on these pins.
 
Posting a short sketch showing the issue would help making sure the reproduction efforts are the same.

Also note what version of OS/IDE/TeensyDuino? - though only the later might matter here most likely.
 
I ran this on a Teensy 4.0, and indeed those 4 pins all measure 3.3V. I tested with Arduino 1.8.10 and Teensyduino 1.49-beta4 running on Ubuntu Linux 18.04 (64 bit).

Code:
void setup() {
  pinMode(1, INPUT_PULLUP);
  pinMode(2, INPUT_PULLUP);
  pinMode(3, INPUT_PULLUP);
  pinMode(4, INPUT_PULLUP);
}

void loop() {
}

pinMode() with INPUT_PULLUP definitely does work.

Are you using Arduino and Teensyduino? Perhaps show us the code you tried and how you tested?
 
Indeed KurtE and myself evolved a HIGH_LOW test sketch for testing T_4.0 breakout boards the sets all pins PULLUP and PULLDOWN in some fashion then logs pin changes to SerMon when GND or 3.3V is applied to any and ALL Teensy 4.0 pins.

When in PULLUP mode the pin13 LED lights until GND'd in that test - and all pins report HIGH with PULLUP until GND is applied, not sure they were ever checked with DMM - but they read HIGH.

Additionally PULLUP ( and PULLDOWN ) are used to detect shored pins, where a shorted pin as INPUT reads high when attached to a PULLUP pin.
 
I have verified that it does indeed work. It looks like my PCB has manufacturing defects. The traces I had that bring out those signals to a 14 pin header are open. Another blank PCB I have shows them as good.
 
Status
Not open for further replies.
Back
Top