??? 02/28/08 02:10 Read: times |
#151579 - Missing the boat. Responding to: ???'s previous message |
The direction of the classical 8051 port pin (P1 to P3) is set by the value written to the port. Writing a zero makes the port output a zero. Writing one makes the port TRY to output a one. But it is a weak one, and can be easily overdriven if an external circuit wants to drive a zero.
It gets more complicated. There are actually three internal circuits that try to pull the port to a logic 1. First, there is a weak pull-up resistor. This is so a zero input that went tri-state will eventually get to a one. Then there is a feedback controlled pullup that is active from about 2 volts up to Vdd. This is stronger, and is the source of the 660uA that was referenced earlier. And finally, there is a stronger P-channel pull-up (dynamic precharge) that is activated for one internal clock after a 1 has been written to the port. |