EmbeddedRelated.com
Forums

question on unused pins

Started by rigelscout October 23, 2003
I know this is probably a dumb question...

What is the recommended configuration for unused pins on an AVR?
High? Low? Let them float?

Thanks...

Karl


At 03:45 PM 10/23/2003 +0000, rigelscout wrote:
>I know this is probably a dumb question...
>
>What is the recommended configuration for unused pins on an AVR?
>High? Low? Let them float?

Definitely make them outputs, or inputs pulled up, otherwise power
consumption goes way up.

Beyond that, it's a religious issue :)


So set them as output then leave them hanging? Goto Ground?
Just want to be sure. I'm going to be breadboarding this weekend and
want to nip stupid errors ahead of time.

Karl --- In avrclub@avrc..., Dave VanHorn <dvanhorn@c...> wrote:
> At 03:45 PM 10/23/2003 +0000, rigelscout wrote:
> >I know this is probably a dumb question...
> >
> >What is the recommended configuration for unused pins on an AVR?
> >High? Low? Let them float?
>
> Definitely make them outputs, or inputs pulled up, otherwise power
> consumption goes way up.
>
> Beyond that, it's a religious issue :)




At 05:17 PM 10/23/2003 +0000, rigelscout wrote:
>So set them as output then leave them hanging?

That's fine

>Goto Ground?

If they are outputs, they better be set LOW!
If you want to tie them to ground, I'd recommend doing it through 1k
resistors, so you can recover from an accidental high. >Just want to be sure. I'm going to be breadboarding this weekend and want
>to nip stupid errors ahead of time.

:) Don't we all! Good luck! >Karl >--- In avrclub@avrc..., Dave VanHorn <dvanhorn@c...> wrote:
> > At 03:45 PM 10/23/2003 +0000, rigelscout wrote:
> > >I know this is probably a dumb question...
> > >
> > >What is the recommended configuration for unused pins on an AVR?
> > >High? Low? Let them float?
> >
> > Definitely make them outputs, or inputs pulled up, otherwise power
> > consumption goes way up.
> >
> > Beyond that, it's a religious issue :) >
>To unsubscribe from this group, send an email to:
>avrclub-unsubscribe@avrc... >
>">http://docs.yahoo.com/info/terms/




On Thu, Oct 23, 2003 at 12:23:05PM -0500, Dave VanHorn wrote:
>
> If they are outputs, they better be set LOW!
> If you want to tie them to ground, I'd recommend doing it through 1k
> resistors, so you can recover from an accidental high.

Using resistors allows you to use those pins if you should happen
to need another one. If you hard tie them you are SOL!

It's worth checking the specs for the part too since in some logic
families, it only requires microamps of current to tie it high, but
substantially more to tie it low.

Mike



>
>It's worth checking the specs for the part too since in some logic
>families, it only requires microamps of current to tie it high, but
>substantially more to tie it low.

An avr input is high impedance, unless the pullup is on. No current either
way.
Even then, it's <1mA.

An AVR output is 20+mA if you tie it the wrong way, without a resistor.


Dave VanHorn wrote:
>> It's worth checking the specs for the part too since in some logic
>> families, it only requires microamps of current to tie it high, but
>> substantially more to tie it low.
>
> An avr input is high impedance, unless the pullup is on. No current
> either
> way.
> Even then, it's <1mA.
>
> An AVR output is 20+mA if you tie it the wrong way, without a
> resistor.
>

Not exactly.

A floating input pin, with pull-up set to off, can be serving as an
antenna,
picking up electric noise. This can trigger the input gates to be flipping
on and off constantly, obviously consumming current.

The best possible way for a very low consume, according to my point of
view, is setup the unused pin as input, pull-up set to off, and install an
external pull-down or pull-up resistor in the 100 kohms range.

Wagner Lipnharski - email: wagner@wagn...
UST Research Inc. - Development Director
http://www.ustr.net - Orlando Florida 32837
Licensed Consultant Atmel AVR _/_/_/_/_/_/




Just FYI...

My coding and breadboarding went perfect. The thing is doing it's
thing.. :)

I've got my computer talking to a 2313 and switching all kinds of
things on and off....

Thanks for the input, gang...

Karl
--- In avrclub@avrc..., "rigelscout" <karl@i...> wrote:
> So set them as output then leave them hanging? Goto Ground?
> Just want to be sure. I'm going to be breadboarding this weekend
and
> want to nip stupid errors ahead of time.
>
> Karl > --- In avrclub@avrc..., Dave VanHorn <dvanhorn@c...> wrote:
> > At 03:45 PM 10/23/2003 +0000, rigelscout wrote:
> > >I know this is probably a dumb question...
> > >
> > >What is the recommended configuration for unused pins on an AVR?
> > >High? Low? Let them float?
> >
> > Definitely make them outputs, or inputs pulled up, otherwise
power
> > consumption goes way up.
> >
> > Beyond that, it's a religious issue :)




On 23 Oct 2003 at 15:45, rigelscout wrote:

> I know this is probably a dumb question...

We all start that way... ;-)

> What is the recommended configuration for unused pins on an AVR?
> High? Low? Let them float?

I always set unused pins (when I have them) to inputs with pullups
enabled. No problems if I accidentally short the pin to the next one
or GND or VCC. Never allow an input to float. I can easily re-program
it if I need to use the pin as an output for debugging.

Have fun! :-)

Regards,
Les. -------------------------
Les Grant. VK2KYJ. Phone: 02 9896 7150 Fax: 02 9896 7153
Grantronics Pty Ltd Int'l: +612 9896 7150, +612 9896 7153
PO Box 275 mailto:info@info...
Wentworthville. NSW. 2145. http://www.grantronics.com.au
Australia.
Microcontroller Hardware and Software development: Atmel AVR
8051 derivatives, 80C196 family, C, ASM, Digital and analogue
-------------------------
Australian distributor for:
o Dunfield Development Systems low cost development tools
o ImageCraft AVR and Motorola Windows-hosted C compilers
o ELNEC Device Programmers (E)EPROMs, Flash, Micros, PLDs
o CAN-BUS Hardware and Software from LAWICEL
o Logical Systems Programming, Prototyping & Production Adaptors
-------------------------



Thanks...

Actually, I set them as output and used an external 1K resistor.

Karl --- In avrclub@avrc..., "Les Grant" <LesGrant@g...> wrote:
> On 23 Oct 2003 at 15:45, rigelscout wrote:
>
> > I know this is probably a dumb question...
>
> We all start that way... ;-)
>
> > What is the recommended configuration for unused pins on an AVR?
> > High? Low? Let them float?
>
> I always set unused pins (when I have them) to inputs with pullups
> enabled. No problems if I accidentally short the pin to the next
one
> or GND or VCC. Never allow an input to float. I can easily re-
program
> it if I need to use the pin as an output for debugging.
>
> Have fun! :-)
>
> Regards,
> Les. > -------------------------
> Les Grant. VK2KYJ. Phone: 02 9896 7150 Fax: 02 9896 7153
> Grantronics Pty Ltd Int'l: +612 9896 7150, +612 9896 7153
> PO Box 275 mailto:info@g...
> Wentworthville. NSW. 2145. http://www.grantronics.com.au
> Australia.
> Microcontroller Hardware and Software development: Atmel AVR
> 8051 derivatives, 80C196 family, C, ASM, Digital and analogue
> -------------------------
> Australian distributor for:
> o Dunfield Development Systems low cost development tools
> o ImageCraft AVR and Motorola Windows-hosted C compilers
> o ELNEC Device Programmers (E)EPROMs, Flash, Micros, PLDs
> o CAN-BUS Hardware and Software from LAWICEL
> o Logical Systems Programming, Prototyping & Production Adaptors
> -------------------------