2

I've not used GPIO on RPi much. On other hardware, the GPIO pins can be configured in software to be in a "High Impedance" state (Hi-Z). I have assumed that it's possible to place most of the RPi GPIO pins in Hi-Z, but after some searching, I find nothing that supports that assumption.

Q: Is it possible to place a RPi GPIO pin in High Impedance state, and if so, how is that done?

Seamus
  • 23,558
  • 5
  • 42
  • 83

1 Answers1

4

Tri-state output circuitry as used for most computer busses can be set Low, High or HiZ. In fact many circuits actually have 4 states as they can be set as Inputs. The state of a bus (consisting of a set of grouped pins) is typically controlled by one or more enable pins.

The GPIO has no similar setting; Outputs can be Low or High; they can alternatively be set as Inputs (with optional pull). Each GPIO is independently controlled.

When set as Input the GPIO is effectively in a high impedance state. All that is needed is to set the pin to Input with no pull.

The Pi actually can be configured into a kind of bus - the SDIO is a 4 bit wide bus with a CLK and CMD pin which is used for bi-directional communication e.g. to SD Card.
The I²C interfaces are also a kind of 1 bit bus, normally with open drain circuitry but simulated on the Pi by configuring as Input.

Milliways
  • 62,573
  • 32
  • 113
  • 225