> >I have seen Microchip documentation that indicates that the MOVWF > >instruction is _not_ read-modify-write and thus should not mess up the > >interrupt-on-change. > > Even if this were true, if an interrupt occurred between the cycle that the > move instruction were fetched and when it was executed, would not you would > miss it because the write would reset the pin latch back to its original > state? > > --Andrew I don't think so, because the interrupt-on-change feature uses a separate latch that is set when the port is read, not the output latch. Also, when an interrupt occurs the pipeline is flushed (ie: the instruction just fetched is executed, but the next instruction fetched will be the one at the interrupt vector). Thus, the timing of an interrupt relative to the write instruction should make no difference. Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics