Go Down

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

SouthernAtHeart

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:
http://www.seeedstudio.com/forum/viewtopic.php?f=4&t=989&start=0
thanks!

CrossRoads

Yes.
Maybe do away. Internal may not have enough oomph to pull up by itself.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

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.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Go Up