| ??? 04/21/08 03:31 Read: times |
#153753 - Have you read at all what I wrote?? Responding to: ???'s previous message |
Have you read what I wrote here
http://www.8052.com/faqs.phtml?FAQ=121619 ? Winston said:
1)port 0 is suitable for as input due to its open drain or high impedance thing. Kai said:
To work as input, means to make it possible for the micro to read the data being driven into the port pin by an external device, just make the nFET being turned-off. Then, only the pull-up resistor "R" is present, which (if not too small) easily allows the external device to drive the port pin high or low. Winston said:
2)to configure as an input in port 0, write 0 the port. Kai said:
So, to work as an input "output data" terminal must be high! But keep in mind, that the output still works as an output, as it emits high level. It's not, that you can switch between input and output mode or anything like that. You only allow the micro to read the input buffer, by turning-off the nFET. Winston said:
3)when connecting a pull up resistor to port 0,it is in high impedance state or so called "nothing" state , no matter what value you write into the port. Kai said:
You see an ouput stage provided by an nFET and a pull-up resistor "R". When the gate is high, the nFET is turned-on, the output is low and the port pin emits low level. But if the gate is low, on the other hand, the nFET is turned-off, the output is pulled high by the pull-up resistor "R" and the port pin emits high level.
The gate is driven by an inverter to provide true "output data", means if data at "output data" terminal is high for instance, then port pin emits high level too. How could you so misread what I wrote? Kai |



