Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 7 of 7

Thread: Can't turn off pull-up resistors on 3.2?

Threaded View

  1. #1
    Junior Member
    Join Date
    Aug 2018

    Can't turn off pull-up resistors on 3.2?

    I've just started a new project with the Teensy 3.2 where I am rolling my own capacitive sensor. When I set the pins to input, the pull up resistor seems to come without using PULL-UP. I have tried several different pins to the same effect. I'm a long-time Teensy 2 user and think I have done this before on the 2.0 with no problem.

    Here is a simplified program that I tried. The circuit is a 100 M resistor from pin 19 to 22, with oscilliscope on pin 22 which shows a continous high state (small voltage divider effect ripple). Pin 19 shows the expected square wave. Thanks for any insight.

    Teensyduino 1.42/ Teensy 3.2/ 96MHz/USB MIDI

    //teensy 3.2
    long int lasttime=0;
    const int driver = 19;
    const int in = 22;
    bool toggle = false;
    void setup()
      pinMode(driver, OUTPUT);
      pinMode(in, INPUT);
      //digitalWrite(in, LOW); //tried this too, no luck
    //*********Main Loop ***************
    void loop()
      if (millis() > lasttime) //run this once every 2000 ms
        lasttime = millis() + 2000;
        if (toggle == true)
          digitalWrite(driver, HIGH);
          toggle = false;
          digitalWrite(driver, LOW);
          toggle = true;
    }// end of main
    Last edited by defragster; 08-26-2018 at 04:24 AM. Reason: added CODE # markup

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts