My intention is to verify that all the pins are working by looping the IO pins to each other and vice versa. ie set D22 and D23 to input and output respectively, short the pins and transmit from one pin to another and vice versa.
I can see that in some pin combinations, the input wouldn't be able to sink enough current. I'm curious if I'd be able to use the integrated pull-up/down resistors (~100kΩ in the Arduino due). I wasn't able to find the information on the SAM3X datasheet.
Accounting for the min output sink (~3mA) and min current sink (~6mA), looks like 2mA should be a good current going to all pins regardless of if it's set to input or output. So if an external resistor is needed to be put in series, my calculations suggest 3.3/0.002=1.65kΩ minimum. I'm hoping to do away with an external resistor by using the pull-up/down resistor but don't know if this is an feasible option.
The external series resistor suggested (or higher) is appropriate.
Question: are you planning on connecting two outputs together, and if so, what do you expect to learn from that? That would be the only situation where one pin would source current and the other would sink current.
You will have a problem if you directly connect two I/O pins that are both set to OUTPUT and in different states. If there is any chance that will happen, use the resistor.
When you switch status make sure you first change the one that was in output and HIGH to LOW and then make it an INPUT. Then you can change the one that was an INPUT into an OUTPUT.
Arduino inputs are a very high input resistance.
The current that flows into an input is extremely low.
I don't have an Arduino Due, but have done some tests using an Arduino Mega 2560 R3.
I used code based on the IDE example 'Blink' to make an output alternate between high and low.
I connected my multimeter between the output and an input, and recorded the results with the input pullup both on and off.
Here are the results:
With the input pullup resistor selected the current varies between <0.01µA (high) and around -140µA (low). The negative sign indicating a current out of the input.
With the input pullup turned off the current is extremely small.
If you look at the 'Trend Chart', you can see spikes of current up to ±100nA as the output switches, but the mean current is ≤10nA.