The example on page 76 of What is a microcontroller, and other examples in this chapter use 2 resistors to perform pulldown or pullup operations on a button. I understand why you would have to use resistors to do this in a pull-down style swtich, however i really would like an explanation as to why you would need to do this with a pull-up style switch?
So long as the pin is set as an input, why are the resistors being used? On top of this, why are these specific values being used in this case? a 220/Ohm and a 10K.·I've seen other examples in other text that have not used any resistors in this·application. (Just a switch to the pin on the 5volt rail).·I'm especially interested in why these values. Could they really be any value in this application so long as the Vss side of the switch is higher than the Vdd side?
I would love to know why? Thanks in advance.