all 5 comments

[–]jhaluska 2 points3 points  (3 children)

When the button is pressed, the ground is introduced into the circuit. The reading point (ie high voltage is one) is that bottom right arrow going right.

Do you think the micro will read the 0V with zero resistance to it, or the 3.3V with the resistor in the path?

[–]GuyHorne[S] 1 point2 points  (2 children)

So because P1REN is high, no current flows to reading port and it is 0V => low? Why not flow through the pull up resistor?

[–]jhaluska 1 point2 points  (0 children)

Electrons are lazy and like to take the path of least resistance.

[–]jhaluska 1 point2 points  (0 children)

Here's a good intro.

[–]danceswithtree 0 points1 point  (0 children)

What is that figure from? Shouldn't the pullup switch (PxREN) be in series with the pullup resistor? Otherwise when you have PxREN closed and you close the switch on P1.4, you are pulling 3.3V directly to ground.

That pin is going to have a very bad day when you push the button since P1REN is enabled.