Share this

Detailed Explanation of High Impedance State in Microcontrollers

2026-04-06 03:14:08 · · #1

Definition and characteristics of high-resistivity state

A high-impedance state refers to a state in a circuit where a pin outputs a high impedance, meaning that the pin is neither high nor low, but rather in a floating state. In the high-impedance state, the voltage of the pin is uncertain and does not actively drive any level; it is equivalent to having no connection in the circuit. Furthermore, a high-impedance pin exhibits high impedance, equivalent to a very high resistor, is isolated from the circuit, and its state is not affected; no current flows into or out of this pin.

The role of high impedance in microcontrollers

Preventing Level Conflicts: In a high-impedance state, the microcontroller's input/output ports can prevent level conflicts. When the port is in a high-impedance state, even if other circuits experience level conflicts, it will not affect the microcontroller.

Signal isolation: High-impedance pins can sense voltage changes in external signals and can therefore be pulled high to logic "1" by a high-level signal. This characteristic makes high-impedance inputs very important in many digital circuits, enabling effective signal isolation and stable state detection.

Applications of multiplexers: In the high-impedance state, a channel of a multiplexer neither transmits nor receives signals, but is in a floating state. This allows that channel to be used to transmit signals from other channels.

High impedance is a common term in digital circuits, referring to an output state of a circuit that is neither high nor low.

If a high-impedance state is input to the next stage circuit, it has no effect on the next stage circuit, and it is the same as not connected. If you use a multimeter to measure it, it may be a high level or a low level, depending on what is connected to it.

Compared to a 5V output, the high-impedance state is characterized by the output pin being in a tri-state, resulting in a significantly higher output impedance, approaching infinity. This state is typically used to achieve bidirectional transmission, allowing for both receiving and outputting signals from external sources. The advantage of the high-impedance state is its extremely low power consumption in the output state, effectively improving the system's power efficiency.

High-resistivity characteristics:

External inputs will not affect the state of this pin, but they can detect signals :

1. A high-impedance pin exhibits high impedance, equivalent to a very high resistor, and is isolated from the circuit. Therefore, when you apply a high level to a high-impedance pin (such as by pulling a signal high externally), it will not affect the state of the pin, nor will any current flow into or out of the pin.

2. Even though the pin is in a high-impedance state, the microcontroller can still configure it as an input mode. In this case, the pin will detect a high level, and this high-level signal can be read in the code. Therefore, even if the pin is in a high-impedance state, it can still detect an externally applied high-level (or low-level) signal.

The essence of high resistance state

In circuit analysis, a high-impedance state can be understood as an open circuit; you can think of it as having a very high output (input) resistance. Its limit can be considered as floating, meaning that theoretically, a high-impedance state is not floating, but rather a state with extremely high resistance to ground or the power supply. In practical applications, it is almost identical to a floating pin.

The significance of high-resistivity state

When the pull-up transistor of a gate circuit is on and the pull-down transistor is off, the output is high; otherwise, it is low. If both the pull-up and pull-down transistors are off, the output is essentially floating (no current flows), and its level depends on the external voltage level; that is, the gate circuit relinquishes control over the output circuit.

Typical applications

In the bus connection structure, multiple devices are connected to the bus, with each device connected to the bus using a high-impedance connection. This allows the bus to be automatically released when a device is not in use, making it easier for other devices to gain access to the bus.

Most microcontroller I/O can be set to high-impedance input. High-impedance input can be considered as having infinite input resistance, meaning the I/O has minimal impact on the preceding stages, does not generate current (and does not attenuate), and also increases the chip's resistance to voltage surges to some extent.

High-resistivity state is commonly represented by the letter Z.

In a system or a whole, we often define some reference points, like the sea level we often talk about. The same applies to a single chip; whether we say high or low level, it's relative. Understanding this makes the problem easier to comprehend.

In microcontrollers, a high-impedance state (High-Z) refers to a pin's electrical characteristics being similar to an unconnected state; that is, the current flowing through the pin is extremely small and has almost no effect on the circuit. Specifically, a high-impedance state has the following characteristics:

Characteristics of high-resistivity state

Input status:

The pin is not driven by any level (high or low), which is equivalent to the pin not being connected in the circuit. At this time, the current in the circuit is almost zero.

No interference:

A high-impedance pin will not cause electrical interference or affect other circuits. It is logically "disconnected" from the circuit, avoiding any potential short circuits or electrical conflicts.

It can be controlled by an external circuit:

A pin in a high-impedance state allows external circuitry (such as an external signal source or other circuitry) to control or read it. Because the pin does not have a fixed output level, it can receive input signals from external circuitry.

Applications of high-resistivity state

Multiplexing (MUX):

High impedance is useful when multiple signal sources need to be connected to the same pin. By setting the pins of unwanted signal sources to high impedance, interference with the selected signal sources can be avoided.

Bus driver:

In a bus system, a high-impedance pin prevents multiple devices from driving the bus simultaneously, thus avoiding signal conflicts on the bus. Only the selected device will drive the bus, while other devices set their pins to a high-impedance state.

Simulated input:

In some analog applications, analog input pins can be set to a high-impedance state when no drive current is required to reduce the impact on analog signals.

Practical examples

Taking the GPIO (General Purpose Input/Output) pins of a microcontroller as an example, when a pin is configured in a high-impedance state:

If the pin was previously configured as a push-pull output (driving a high or low level), setting it to a high-impedance state will cause it to no longer drive any level, effectively "disconnecting" the pin's output.

If the pin was previously configured in input mode, setting it to high impedance is similar to input mode, allowing external circuitry to be connected to the pin and read external signals.

Analysis of the bidirectional nature and high impedance state of microcontroller I/O ports

A microcontroller's I/O ports, or input/output ports, are bidirectional, capable of being used for both input and output. In push-pull output mode, the I/O port can output high and low levels by switching between its internal upper and lower MOSFETs. However, when the I/O port is in a high-impedance input state, both its internal upper and lower MOSFETs are turned off, and the I/O port enters a high-impedance input mode. So, what exactly is a high-impedance state? Let's take a closer look using a common I/O internal block diagram.


When an I/O port is in a high-impedance state, it is usually referred to as a floating input state. In this state, the I/O port's voltage level is uncertain; it is neither fixed at a high level nor a fixed at a low level. To help understand this, we can imagine that when the microcontroller detects the I/O port's voltage level, the CPU has a high-resistance voltmeter connected inside, say, with an internal resistance of 100MΩ (refer to the relevant circuit diagram for a detailed illustration). In this context, we can call the internal resistance of this voltmeter the input resistance of the I/O port in its high-impedance state.

Now, let's imagine a scenario: if someone accidentally touches an I/O port, the human body has high resistance, and there's electromagnetic interference in the surrounding environment, potentially generating a weak current. In this situation, the voltmeter reading will change, thus affecting the voltage level read by the microcontroller. The high impedance characteristic means that even slight interference can cause fluctuations in the read voltage level, and even without touching the I/O port, the reading results can be drastically different each time. This is mainly because external electromagnetic waves can interfere with the I/O port. When the I/O port input is not in use, it can be connected individually to VDD or VSS using a resistor.

So why does a bidirectional I/O port require a high-impedance state for input? We can explain this phenomenon using a hypothetical input device. The equivalent circuit of this device is as follows: its internal switch outputs high and low levels to the microcontroller's I/O port, and the I/O port can detect whether the input is high or low using an internal voltmeter. However, it's worth noting that this device has weak driving capability and may not even be able to drive LEDs. The 100kΩ resistor in the device can be considered its output resistance (or output impedance).

What happens if we use an internal pull-up resistor for input detection, set the device to output a low level, and connect it to the microcontroller's I/O port? In this configuration, the 5V voltage will flow through the 10kΩ pull-up resistor inside the I/O port, then through the I/O port, then through the 100kΩ resistor inside the device, and finally to ground via a switch. According to the voltage divider principle, the voltage measured by the I/O port will be approximately 55V, causing the microcontroller to misread it as a high level. However, in reality, the device is trying to output a low level to notify the microcontroller. In this case, although the microcontroller's pin is used as an input, it unexpectedly changes the output value of the external device, as if the microcontroller's I/O port is also actively outputting a signal.

If we set the microcontroller's I/O port to a high-impedance state and ensure there are no external pull-up or pull-down resistors, the two internal MOSFETs will be in the off state, presenting a high impedance to the external circuit. In this state, the output level of the device can be accurately read by the microcontroller, thanks to the device's output resistance being lower than the microcontroller's I/O port input resistance. One might imagine that if the resistance in the device were increased to 1000MΩ, the microcontroller might not be able to accurately read the level. However, we usually don't need to consider such an extreme case. Ideally, the input impedance in the high-impedance state should be considered infinite, similar to the characteristics of a superconductor. In practical applications, the resistance of the wire is usually considered extremely small, therefore the input resistance in the high-impedance state is also considered infinite.

Read next

CATDOLL 136CM Seina

Height: 136cm Weight: 23.3kg Shoulder Width: 31cm Bust/Waist/Hip: 60/54/68cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm An...

Articles 2026-02-22