Reply by Wagner Lipnharski October 27, 20032003-10-27
rigelscout wrote:
> Thanks...
>
> Actually, I set them as output and used an external 1K resistor.
>
> Karl


If you are setting them as output, do not use the 1 kohms resistor.

If the pin is set to UP level and the resistor is connected between the pin
and ground, you will have around 4.8mA flowing (considering 5V at VCC) in
each resistor. That is not necessary, waste of energy and probably heating
the chip without any reason.

Or you set them as output and leave them open, or set them as input and
install a resistor between the pin and VCC in the value of 10 kohms and 100
kohms. You can program the pin to have pullup or not. In case of
programming them as input without the pullup, then the external resistor to
VCC is really necessary.

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


Reply by rigelscout October 26, 20032003-10-26
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
> -------------------------




Reply by Les Grant October 26, 20032003-10-26
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
-------------------------



Reply by rigelscout October 26, 20032003-10-26


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 :)




Reply by Wagner Lipnharski October 24, 20032003-10-24
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 _/_/_/_/_/_/


Reply by Dave VanHorn October 23, 20032003-10-23

>
>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.


Reply by Mike Murphree October 23, 20032003-10-23
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


Reply by Dave VanHorn October 23, 20032003-10-23
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/




Reply by rigelscout October 23, 20032003-10-23
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 :)




Reply by Dave VanHorn October 23, 20032003-10-23
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 :)