fiddler:
I want to be able to apply both 12 and 24VDC to an input pin though a switch.
I'm switching to ground/0V.Not sure I understand the 'switching' part statement, can you post a drawing?
Using a couple of resistor as a voltage divider, I have the following questions:
- do I need a resistor between the Arduino pin and the voltage divider as well ?
No
2. what is the input pin impedance ?An input pin is very high impedance, many megohms.
- and does pin impedance change if it is a selected as an input or output
Oh yea. Once pin is programmed to be a output pin, it becomes a active current source or sink, rated at up to 40ma absolute maximum. Be sure you never make a pin an output by mistake. The AVR chip cannot prevent damage from brain farts. Upon power up or reset condition all I/O pins are set to input mode. They only switch to output mode as a result of program code.
Trying to keep the smoke in
And that is always a good rule to follow.
K