I have an Uno connected to some external equipment (robot). The equivalent diagram is as following:
(1) The Uno and the robot electronics have the common ground. (2) Uno is powered by either the external power supply or by the computer USB port (3) The robot is powered by 6V battery (4) Both the Uno and the robot may have power on or off randomly, and the power-up procedure can't be implemented (e.g. user unplugs USB at will). (5) The idea is to use an LED in series with the 1K resistor to supply slightly less than 5V into the digital ports of Arduino (only D12 is shown on the diagram). This would provide both the signal conditioning (less than 5V on the port) and the visual indication of the Uno-to-robot link. (6) With all the components but without Arduino, the voltage reading at the test point is 4.85 V, as shown. If the test point is shorted to the ground, the current does not exceed 4.5 mA (LED lit, naturally).
Could anybody advise what happens if:
Case A -- Pin D12 configured as an input with no pull up.
(A1) S1 is off (UNO has no power), S2 is on -- ?. (A2) S1 on, S2 off -- obviously "floating input pin" (A3) S1 and S2 on -- ?
Case B -- Pin D12 configured as an input with an internal pull up resistor.
(B1) S1 is off, S2 is on -- Same as A1?. (B2) S1 on, S2 off -- obviously "logical one" on the input (B3) S1 and S2 on -- ?
Case C -- Pin D12 configured as an output.
(C1) S1 is off, S2 is on -- Same as A1?. (C2) S1 on, S2 off -- obviously nothing happens (C3) S1 and S2 on, D12 Low -- ? (C4) S1 and S2 on, D12 High -- ?
I suspect I know some answers, but I only have one board and don't want to experiment with it. Any insight would be greatly appreciated.