On Tue, 30 Dec 1997 13:21:59 -0600 John Payson writes: >My preference (except that it wouldn't be compatible with existing >parts) >would be to have the portB pins compared to the OUTPUT latches. This >would >save circuitry and eliminate many of the problems related to PORTB >interrupts. >Unfortunately, I don't know how to do that without breaking some >existing >designs. This is definitely the way it should have been done in the first place. What other use are the output latches when the pins are set for input? Most existing software would not work though, since it just does a read to reset the change detector before sleeping. If the existing application uses the RB change detector in the recommended way only to wakeup from SLEEP, the SLEEP instruction could be hooked to new logic that resets the change detector. The SLEEP sequence would copy the pins being compared to the output latch, and reset the RBIF bit. Most, though certainly can't be sure if all, such applications would attempt to reset the change detector immediately before sleeping.