Subject: Time: 8:03 AM BCF and BSF on I/O ports 5/12/99 Date: I've been trying to understand this problem of using BCF or BSF with I/O ports. I have yet to see a satisfactory explanation of why it should not be done. I understand about read, modify write instructions and that reading a I/O port reads the pin levels. You may not get what you expect with a read, but what do you expect? If a bit is an output, I expect to read whatever is latched because the pin is connected to the latch. One explanation I saw read ; "but, what if the latch is high and the pin is pulled low?". Can someone explain how this is possible with out exceeding the 25 ma sink limit of the pins? I understand that a BCF on one output pin could affect the state on another output pin if the pin level does not match the latched level but normally this doesn't happen does it? I also read somewhere "inputs always read as 0". Should not the pin level of inputs read high or low depending on whether the pin is being pulled high or low by an external source or sink? I understand that if you change an input to an output, the level may not be what you want it to be. But surely you would realize that and modify the level accordingly. I've read a number of people mention that problems can be solved by using a shadow register and that their programs started working when they did. I just don't see why the problem should normally even come up. BTW can anyone point me to a list which shows which instructions are read, modify write and which are not? Stan