Hi, I'm trying to read data off an I2C bus using a software simulator. I see in the P1 peripheral dialog that P1.0 (SDATA) is low in the "Out" line, but the "In" line (latch?) has all of its high. All I want to do is to read the bit in the "Out" line, but when I try to do so, I get the "In" line (although the debugger shows P1.0 as low).
My question is - Can someone explain the difference between the two? I know one is the actual input pins and one is the output latch, but how do I manipulate the latch? How is it helpful? How do I read the actual value of the input pins?
I've read http://www.keil.com/support/docs/2071.htm and many more and still couldn't get a clear understanding of it...
Thanks!
I recommend to read this two KB articles:
http://www.keil.com/support/docs/2443.htm http://www.keil.com/support/docs/1941.htm
The simplest feature of the '51 is also the one that many manage to make complex There is no, none, nada, zero, keine, ingen, niente output or input pins in a '51 only quasi bidirectional pins.
read these two www.8052.com/faqs.phtml://www.8052.com/faqs.phtml?FAQ=121619
Erik
PS since you, as so many others, seem to consider it a secret what actual derivative you are using, I must add that some modern derivatives have configurable port, for those the above is only partially valid.