Greetings! I'd appreciate a reminder of something which I know has been discussed before on the PICLIST, but which I have not so far found in the various PIC FAQs on the WWW. I wish to put a 16C84 into sleep mode in a low-power application until either of two Port B inputs receives a "low" pulse of about 1 second duration from an external device. I believe that it should be possible to use the Port B (RB4-7) "wake-up on change" facility to achieve this, but I recall that there are some potential pitfalls to avoid. I enclose a snippet of code which forms the main program loop: INIT MOVLW B'01010000' ; Set RB4 and RB6 to be inputs TRIS PORTB ; .. outputs are "don't cares" MOVLW B'00001000' ; Configure wake-up from sleep MOVWF INTCON ; .. on RB4-7 (no interrupts) LOOP BCF INTCON,RBIF ; Forget any previous activity COMF PORTB,W ; Get inverted port bits ANDLW B'01010000' ; Mask off RB4 and RB6 BTFSS STATUS,Z ; If either is active GOTO PULSE_RCVD ; .. deal with it SLEEP ; Snooze until RB4-7 change GOTO LOOP ; Process the change Note that my PULSE_RCVD routine completes in much less than one second and administers a reset pulse to the external device to release the appropriate (RB4 or RB6) input before it returns to "LOOP". It is crucial that no input pulses are missed. Will the above code achieve this? Thanks in advance for any assistance. -- Ian Chapman