Shop OBEX P1 Docs P2 Docs Learn Events
Unused port pins... tie HIGH, tie LOW, or just float? — Parallax Forums

Unused port pins... tie HIGH, tie LOW, or just float?

Old_LadyOld_Lady Posts: 20
edited 2008-12-10 15:35 in General Discussion
I'm using the SX48DB.· I've read the datasheet twice, but I can't find reference to what I should do for my unused port pins.· I can configure them using SW to a High-Z input, or an output, but if I'm not going to use them, should I tie them HIGH through a resistor?· Or if I do configure them via SW, can I just leave them unconnected on my schematic (floating?)

Thanks,
·· ~ Laura

Comments

  • mojorizingmojorizing Posts: 249
    edited 2008-12-05 17:49
    Unused pins disconnected and set as input, internal pull-ups enabled. MCLR pin pulled high thru a 10K resistor. Are you using SX/B?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Bad spellers of the world untie!
  • Mike GreenMike Green Posts: 23,101
    edited 2008-12-05 17:50
    For all unused I/O pins, you should either

    1) Configure the pin as an output, either high or low and leave it unconnected

    2) Configure the pin as an input (the default) and tie the pin through a high value resistor (like 10K to 100K) to either Vdd or Vss (ground).

    The reason:

    An input pin has a very high impedance. If left floating, it will respond to the electrical fields around it, even if there's nothing connected to the pin. Typically, this will result in the input moving through the range of voltages and it will likely spend most of the time in the "linear range" somewhere in the middle. This will partially switch the input transistors and increase the power requirement of the input circuitry quite substantially.

    I'm not sure, but I think you can configure SX48 I/O pins to have an internal pullup to Vdd. If you do this, you wouldn't need an external pullup as in #2.
  • Guenther DaubachGuenther Daubach Posts: 1,321
    edited 2008-12-05 17:51
    Hi Laua,

    floating inputs are never a good idea. I usually program unused port pins as outputs, and set them to low level. You may also configure them as inputs but they should be pulled up or down in this case. It is a good idea to activate the internal weak pull-up resistors, so you don't need to make any external connections to the port pins, just leave them open.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Greetings from Germany,

    G
  • BeanBean Posts: 8,129
    edited 2008-12-05 19:34
    Laua,
    Just to echo what has already been said. I find it safest to make them inputs with the pull-ups enabled. This way if the pin does get connected to something (solder bridge or whatever) it will not cause any damage. If the pin is pulled high and gets shorted to ground it will most likely cause damage to something.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    "The welfare of the people in particular has always been the alibi of tyrants." ~ Camus
    www.iElectronicDesigns.com

    ·
  • pjvpjv Posts: 1,903
    edited 2008-12-05 20:57
    Hi Laura;

    And in case you were not aware, the silicon for the SX/48 is really the silicon of the SX52 which has 8 bits for portA. Unfortunately the 52 is no longer produced due to pakaging restictions, so all we have pinned out now is the lower 4 bits of port A.

    But the upper 4 bits still exist on the silicon, so eventhough you can not get at them from the outside, you must still deal with them to prevent floating inputs. You can still program them as inputs or outputs (setting them high or low as handy flags) and the internal pull ups are still available to them.

    Cheers,

    Peter (pjv)
  • Old_LadyOld_Lady Posts: 20
    edited 2008-12-10 15:35
    Thanks for all of your replies.
    And apologies to all, especially Gunther...
    I just found this same question in his FAQ document, on page 27. I will read through this document again before posting any more questions!

    ~ Laura
Sign In or Register to comment.