Go Down

Topic: using interrupt and the pull up resistor on the same pin (Read 3 times) previous topic - next topic


Can I use the internal pull-up resistor with an attachInterrupt at the same time on the same pin?

Code: [Select]
attachInterrupt(0, CountPulse, RISING);//turn on interrupt for flow sensor on pin 2
digitalWrite(2, HIGH);  //turn on pull up resistor for flow sensor on pin 2

Will this do away with the need of the 10K resistor in the example for this sensor:


Maybe do away. Internal may not have enough oomph to pull up by itself.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Nick Gammon

The internal pull-ups are spec'd as being 20K to 50K, so maybe typically 35K? Not exactly the same as 10K. It might work, as CrossRoads said.

Go Up