Electronic – Are CMOS outputs high-Z when unpowered

gpiomosfet

If a microcontroller I/O pin drives an external MOSFET, and the microcontroller's power is turned off, will that MOSFET's gate be floating? I know sometimes a resistor is added to ground, but are there risks if I don't place the resistor?

Best Answer

When turned off, the output state is undefined (almost certainly pretty high impedance, but there may be protection diodes and other features that will cause variations between parts), so it's best not to assume anything about it unless the datasheet specifies something definite. Of course you can test the output impedance yourself with a multimeter if you want to get an actual figure to go from.

If your design requires an output line to not be left floating when the micro is off, then definitely use the resistor. This is good practice anyway for cases where the microcontroller may malfunction (or the pin becomes physically disconnected), so the pin has a "default" state.