quasi-directional

Discussion in 'Embedded Systems and Microcontrollers' started by Yeti, Feb 15, 2007.

  1. Yeti

    Thread Starter Active Member

    Jul 26, 2005
    35
    0
    What exactly does it mean for quasi-directional ports for a uC?

    My question stems from this example:
    MOV P0M1, #0 ;These two lines set the port to be quasi-directional
    MOV P0M2, #0

    Thanks
    Yeti
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,145
    1,791
    The term is "quasi-bidirectional", and it is a port pin structure common on the 8051 and it's many derivatives. The characteristics are a strong N-channel pulldown transistor that can sink several milliamps, and a very weak P-channel pullup that can source only a few tens of microamperes. The drive characteristics are asymmetrical. In such a port, an output of 1 or high, can be driven to ground by some external source. and no excessive current will flow through the P-channel output device. In a true bidirectional port the output stage would be high impedance in order that it would have no effect on the input.

    Compare this to a Motorola or Microchip part to see the difference. It takes less silicon to implement the quasi-birdirectional port and in 1976 when the 8048 (predecessor of the 8051) came out, picoacres of silicon were precious
     
  3. Yeti

    Thread Starter Active Member

    Jul 26, 2005
    35
    0
    Thanks for the explanation. It brought another question to mind:

    Would there be any good reason to not set all the ports to be Quasi-bidirectional? why use external pull up resistor when theres internal ones.

    thanks
    yeti
     
  4. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    The internal pull-ups are only enough to pull up an open input pin and prevent oscillation. They are too small for use with an actual load.
     
  5. Papabravo

    Expert

    Feb 24, 2006
    10,145
    1,791
    The ports on an 8051, except for P0, are inherently quasi-bidirectional. P0 has open drain outputs. They have no configuration register, only a data register. If a pin is to be used as an input you must write a one to the output data latch which is part of the SFR registers P0, P1, P2, and P3. If you want to use P0 as an input you need to write a one there also to turn off the low side N-channel switch.
     
Loading...