On 29-Jan-02 Jennifer Loiacono wrote: > Because of the read-modify-write structure, a write to PORTx actually writes > to LATx. A write to the PORT register first triggers a read of the present > port values, then alters the value in the LAT register, then writes back to > the port. If another pin on that port is used for bidirectional I/O, it > could cause problems. For example, if a pin is set as an input when the > data is read, the value would overwrite what is already in the register. I don't see how this is a problem since the bit is an input the value in the latch is irrelevant...... unless you switch back to output without first making sure you know what state the latch is in, which I would consider to be good programming practice. Also there are issues when driving capacitive loads where it may take several instruction times for the output drivers to change the state of a pin. I had an example if this the other day when I had a piezo sounder wired directly to a PIC. Peter Onion. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.