9
\$\begingroup\$

Some times, I want my MCU or CPLD to input a static logic. So, I choose to tie it to VCC or GND. The problem is that should I put a resistor in series to limit the current? I just think by myself for a while and get my own answer: no! Take STM32F103(datasheet) for instance,on page 86: IO characteristics From the 'input leakage current', I know that when applied VDD the input resistance is at least 1 M ohm so that I do not need a resistor in series to limit current. Is that reasonable?

\$\endgroup\$
  • \$\begingroup\$ I add a pull-up or a pull-down if I think the pin may bet used during a design. \$\endgroup\$ – Andy aka May 29 '13 at 15:16
  • \$\begingroup\$ so, it has nothing to do with current limitation.... \$\endgroup\$ – oilpig May 29 '13 at 15:28
14
\$\begingroup\$

Hard connection of a pin to the VCC or GND is o.k. from a functional standpoint for high impedance inputs such as CMOS logic inputs. It also happens to be convenient on PC board design where it eliminates an additional component.

There are several conditions under which having an input pulled up or down via a resistor would be better than a direct rail tie. Here are some of those reasons.

1) If the pin happens to just be an input by default but can be programmed as bidirectional or output then accidental programming could cause the default state to change. A resistor could save a part from damage provided the pullup resistor value was sized properly to limit current to safe levels.

2) If there was any chance that you wanted to utilize the pin for some added function or feature during your project development having a pullup resistor allows for immediate use of the pin whereas a GND or VCC connection would require copper etch cuts. Having a pin connected into a copper plane via a thermal spoke type pad it can make it quite difficult to perform to pin isolation from the power rail copper.

3) Spare I/O pins can often see good use for temporary connections while developing the software for an MCU. With a pullup / pulldown on the pin you can use the pin at will and you have an easy place to attach a wire to connect the test signal. If it happens to be a leaded resistor you may even have a nice place to clip on a mini hook grabber.

\$\endgroup\$

protected by W5VO May 29 '13 at 15:04

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.