Two Pushbuttons on One Input for More I/O

I would want to measure the actual voltage at the input pin when no switches are pressed to see if a valid logic voltage is present. A high value pull down with the internal pull up enabled may not be valid.

If the Atmel data sheet can be relied upon, input current (with pull-up disabled) for voltage between 10% to 90% of Vcc should be within +/- 10 uA. Through 150K to ground, that comes to +/- 1.5 V, well below the approx. 2.6 V threshold between LOW and HIGH readings. (The input protection diode limits negative voltage to approx. -.6 V.) The pull-up value is 20K - 50K, yielding a HIGH input voltage of 3.75 - 4.41 V. Again, this is well above the threshold. +/- 10 uA would affect this by less than +/- 0.02 V.

Using a triple voltage divider wired to a analog input pin is a better solution in my opinion.

After posting this, I was thinking of a possible improvement using a binary weighted voltage divider. I suspect one could unambiguously decode 4 buttons with a single analog input, and maybe 8. This approach has the advantage of detecting any combination of buttons, even if two or more are simultaneously pressed. Figuring out the necessary tolerances began to make my head hurt, though.