confused between bidirectional pins and pull-up/downs

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

i have a small confusion.
i understand that pull-up and pull-down are for stability and active-low, and active-high ICs.
Are they anywhere related to the direction of that pin?
for example, is a pin is pulled-up to become input and is is pulled-down to make it an out-put?

is there anysuch principle or architecture?

please explain how bidirectional pins function.

Thank you..

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Such a confusion do is small.
Pull-ups and -downs have obviously nothing to do with functionality of pin. Any input or output can virtually be configured with any of these features.
IIRC this mushroomed from bus architecture related solutions.

Quote:
pin is pulled-up to become input and is is pulled-down to make it an out-put

This is not completely true statement in AVR context, assuming familiarity with basic IO port configuration via DDR.
This can be implemented intentionally (hardware or software way), nevertheless, if required (i.e. definitely not by just pulling via external resistance).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Are they anywhere related to the direction of that pin?
for example, is a pin is pulled-up to become input and is is pulled-down to make it an out-put?

No! Pull up & pull down resistors are used on inputs. They have really nothing to do with outputs. These resistors ensure a valid logic condition in the absence of a input signal from say a switch. Generally pull-ups are used rather than pull-downs.

Occasionally you may need a resistor connected to the output of a IC when they are open collector/drain devices. I would not call them pull up or pull down resistors, but load resistors. (Typical IC's LM339, 74XX05,06 uLN2003 etc.)

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If this is a comparison with the 8051 port pins, then the AVR is a bit more flexible. An 8051 port pin can only sink current whereas an AVR port pin can source and sink current. With the 8051, the pullup resistor is always there, so for the port pin to work as an input, you write a logic '1' to the port pin. This turns off the output mosfet from sinking current to the port pin can be driven by other sources.
The AVR (and most other micros) have a data direction register to select each port pin as input or output and a register to read the input state and a register for the output state.
I would suggestbyou have a close read of the ports section of an AVR datasheet and compare this to a 8051 and all should become clear.