Potential for digital outputs

One question: What is the state of the Ardoino Nano's digital outputs when they are not driven? High-impedance or ground? Thank you. Joachim

Take a look into the datasheet.

If you use pinMode(somePin, OUTPUT), somePin will never be in high impedance; the output value will be LOW; you can easily check yourself by using a multimeter.

If you first set the output level with digitalWrite(somePin, HIGH) before the pinMode call, the output will be HIGH after the pinMode call.

"When employing pinMode(somePin, OUTPUT), somePin consistently maintains a low impedance state; consequently, the output value defaults to LOW. Verification of this behavior can be easily accomplished through a multimeter assessment.

However, if you precede the pinMode function with digitalWrite(somePin, HIGH) to establish the output level, the pin will retain a high state subsequent to the pinMode call."

It will be high impedance (configured as input) until you write to it or define it as an output.

If you want to switch it to high impedance you can re-define it as input, or read it (and optionally ignore the reading).

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.