Skip to main content
Renesas Electronics America - Knowledgebase

Why are resistors needed for input pins?

Latest Updated:05/01/2009


In the table listing the recommended handling of unused pins in a microcontroller, it says to pull the pins up to the power supply level or pull them down to the ground level using resistors when the pins are in the input mode, and to leave the pins open when they are in the output mode. In the case of I/O pins, is either handling OK?
Why are resistors needed for input pins?


It is OK to handle the pins in either mode (pull up/down or leave open). Note, however, that I/O pins enter the input mode after reset, so pulling them up or down using a resistor is the best handling method.
If you wish to reduce the number of components, we recommend setting the pins to output. In this case, a through current may flow until output is set, but since this is caused by a noise-derived fluctuating voltage and not by a fixed midpoint voltage, this current does not flow continuously. If output is set immediately after reset, most problems, such as damage, will not occur.
Even if a pin is left set to input, we recommend pulling the pin up or down using an external resistor because the program freezing or noise might change the mode from output to input. We recommend using an external resistor because the settings of internal resistors may be changed if the system malfunctions. Only dedicated input pins that have no output mode can be connected directly to the power supply or ground.
In the case of systems that must maintain a high level of reliability over many years, however, resistors should be inserted even for dedicated input pins. As an extremely rare case, if a current flows to the gate input due to product degradation, the current of the entire system may be pulled by the through current of the input transistors, causing the system to fail.
Suitable Products