??? 01/27/06 13:45 Read: times |
#108497 - Yes, that's it! Responding to: ???'s previous message |
Oleg said:
And so what? Using terms "input and output modes" we should answer: "yes, writing '1's to the port P1 makes it as input port".
Then he asks: "whatta hell, I need to have it as output with '1's!!!". And only after this we start to explain that "in fact, 8051 has no separate input or output port modes, etc...". Yes, you hit the nail, Oleg! The "Bible" is misleading in this point, when it says the port can be configured as input. Then, the newbie immediately asks "And how do I configure the beast as output??" I wanted to focuse on this issue, and that a newbie isn't just babbling when asking about. Many of us, like Mahmood mentioned, had the same trouble when first being confrontated with this. I would not talk about "input mode" and "output mode" either, because there are micros which indeed have such modes, instead of standard 80C51. Funny enough, even datasheet of P89LPC952 does not talk about "modes", although this micro provide them. They mainly call them "configurations". What we would call "input mode" is called "input-only configuration". So, for a newbie this is hot stuff, not easy to understand. And, so, no reason to call him a "babbler"... My terminology is the following: "If I want the port pin to be used as input I have to write 1s into the according port latch. And if this port pin is driven by an external source I have to be careful not to change the state of this port latch afterwards." I do not use other phrases, neither "input mode", nor "output mode", nor "quasi-bidirectional", or whatsoever. Kai |