Atmega has software selectable internal pull up resistors on the IO pins. How (if possible) can I wire external pull down resistors so that I can enable/disable them via software?
I suppose you could use a transistor as a pull-down, and control it via another output pin - although it seems like a strange thing to be doing.
This may work: Use a i/p pin connected to a resistor connected to a MOS FET connected to ground. Use a digital o/p to turn on the FET.
You could also use a OPTO FET "H11F1" or a 5 volt reed relay.
Why not just put a resistor (maybe about 2k to 10k) from another pin to the desired pin and drive the resistor pin low.
magnomp: Atmega has software selectable internal pull up resistors on the IO pins. How (if possible) can I wire external pull down resistors so that I can enable/disable them via software?
You could do what justone states but it begs the question of WHY?
The software that would enable/disable the extra pin could even easier simply flag whether or not to read the original pin. Less parts used, less to go wrong.
Also reconsider using the pullup. It reads high until you pull it down through ground. It's safe and draws very little current from your 200 mA total.
How much current? You may use a few digital pins , just wire up different resistors to them ( 1k, 5k, 10k etc), and than in software you select desired pull down calling pinMode(Rx, OUTPUT), digitalWrite(Rx, LOW), and pinMode(Ry, INPUT) for others pins to disconnect them. Voltage shouldn't be over specified rating for your board