Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] input port

2005-08-03 by Bruce Parham

If low power in needed, all i/o pins need to be in valid high or low states. A floating input
that has drifted to some intermediate level can cause the input buffer to draw more current
than it would with a valid input. The simplest way to handle this, with an avr, is to set all
unused (unconnected) i/o pins to outputs. This forces the pin into a valid level and the input
buffer will not draw excessive current.

Some older avr parts have a few input only pins. The only way to insure that thay have valid
levels is to tie them high or low.

Bruce


Farzlina Ab.Hadi wrote:

> I configured the ddrf as input by ddrf = 0. But somehow this will make 
> the current higher..I have to check other ports that are inputs. Just 
> to check whether it is only adc related problems or not. 
>  thanks!
> -------Original Message-------
>  
> From: wbounce <mailto:wbounce@safeplace.net>
> Date: 08/03/05 08:01:15
> To: AVR-Chat@yahoogroups.com <mailto:AVR-Chat@yahoogroups.com>
> Subject: RE: [AVR-Chat] input port
>  
> ddrf set to 1 makes the port\pins output and enables the pull up 
> resistor which is why the current is high
> -----Original Message-----
> From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On 
> Behalf Of Farzlina Ab.Hadi
> Sent: Tuesday, August 02, 2005 5:40 AM
> To: AVR-Chat@yahoogroups.com
> Subject: [AVR-Chat] input port
> 
> hi, do we actually need to specify the ddr of the port if it to act as 
> input?.  I am working on the ADC of mega128. the adc is working fine but 
> there's a small issue on the current. I noticed that if I include in the 
> source code the instruction to set ddrf as input, the current will be 
> high. but if i remark the instruction, the current will be low. Is there 
> any connection?
>  
> thank you for any reply.
> 		
>

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.