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:1. do I need a resistor between the Arduino pin and the voltage divider as well ?No2. what is the input pin impedance ?An input pin is very high impedance, many megohms. 3. and does pin impedance change if it is a selected as an input or outputOh 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
So, how come this other one works when there are essentially two 330K resistor in series between VDD and GND, which should give 6 to 12V on the chip pin when the switch is O/C ?
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16