quasi-directional

Thread Starter

Yeti

Joined Jul 26, 2005
35
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
 

Papabravo

Joined Feb 24, 2006
21,225
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
 

Thread Starter

Yeti

Joined Jul 26, 2005
35
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
 

beenthere

Joined Apr 20, 2004
15,819
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.
 

Papabravo

Joined Feb 24, 2006
21,225
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
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.
 
Top