> That's a sensible thing to do. Is r-m-w a peculiarity of the PIC ? > The AVR, for example, is quite different. There's no mention > of r-m-w with regard to any port operation. In fact you can > perform two distinct reads of a port - you can either read the > latches or use the PIN instruction to read the logical values > present on the pins > Most micro's use RMW, the peculiarity with the PIC is that when such an operation is performed on a PORT, the value read is not that in the data latch, but rather the values on the pins. The 18C/18F series fixed this problem as you can read either the pins or the data latch. Mike -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu