Go Down

Topic: What to do with unused pins? (Read 4 times) previous topic - next topic

Jack Christensen

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Coding Badly

Quote
Assuming you leave them be (no connections to Vcc/Gnd), is there any difference at all between making the pins outputs, and making them inputs with pull-ups enabled?


Yes.  If you accidentally touch a hot wire to an output set low you've short-circuited your processor and fried it.  If you accidentally touch a ground wire to an output set high you've short-circuited your processor and fried it.  If you accidentally touch either wire to an input w/ pull-up you won't even notice.

Or are you asking about power consumption?  In which case there's no difference.

bubulindo

If you are building a PCB for testing purposes, mapping the unused pins to a pad so you can use them on a breadboard later on is the way to go.

If the PCB is going to be a stand-alone device, then it would be advisable for you to connect them to one of the logic levels. +5V or GND. The reason for this is, as hinted by Coding Badly, the possibility that if the pins don't have a fixed voltage on them, they'll fluctuate and cause the logic on the pin to change and consume power. It's up to you really...

However, you must take care when using the pins when you do this. Or put an external pull up on that pin. That way, you'll be safe in any of these:



Leave them be.  If the pin is connected to GND and you accidentally configure it as an output and set it HIGH, you've fried the processor.  If the pin is connected to GND and you accidentally enable the internal pull-up, you're wasting electricity.  If the pin is connected to VCC and you accidentally configure it as an output and set it LOW, you've fried the processor.

Ideally, you will configure the unconnected pins as inputs with the internal pull-up resistor enabled.

Eu não sou o teu criado. Se respondo no fórum é para ajudar todos mediante a minha disponibilidade e disposição. Responder por mensagem pessoal iria contra o propósito do fórum e por isso evito-o.
Se realmente pretendes que eu te ajude por mensagem pessoal, então podemos chegar a um acordo e contrato onde me pagas pela ajuda que eu fornecer e poderás então definir os termos de confidencialidade do meu serviço. De forma contrária toda e qualquer ajuda que eu der tem de ser visível a todos os participantes do fórum (será boa ideia, veres o significado da palavra fórum).
Nota também que eu não me responsabilizo por parvoíces escritas neste espaço pelo que se vais seguir algo dito por mim, entende que o farás por tua conta e risco.

Dito isto, mensagens pessoais só se forem pessoais, ou seja, se já interagimos de alguma forma no passado ou se me pretendes convidar para uma churrascada com cerveja (paga por ti, obviamente).

floresta

Quote
Ideally, you will configure the unconnected pins as inputs with the internal pull-up resistor enabled.
Ideally you would just leave them as Atmel does, in their default condition.

Don

Coding Badly

Quote
Ideally you would just leave them as Atmel does, in their default condition.


Or even more ideal, follow Atmel's guideline for unconnected pins...

Quote
13.2.6 Unconnected Pins
If some pins are unused, it is recommended to ensure that these pins have a defined level. Even though most of the digital inputs are disabled in the deep sleep modes as described above, floating inputs should be avoided to reduce current consumption in all other modes where the digital inputs are enabled (Reset, Active mode and Idle mode).

The simplest method to ensure a defined level of an unused pin, is to enable the internal pull-up.  In this case, the pull-up will be disabled during reset. If low power consumption during reset is important, it is recommended to use an external pull-up or pull-down. Connecting unused pins directly to VCC or GND is not recommended, since this may cause excessive currents if the pin is accidentally configured as an output.

Go Up