Roman: This version does give you an extra instruction between the output and the input: loop: movf current1,W movwf PORTB goto $+1 movf current2,W movwf PORTB nop movf inputs_last,W xorfwf PORTA,W skpnz goto loop xorwf inputs_last,W movwf inputs (sorry for the repeat on the send, but your comments indicated you hadn't seen this) Bob Ammerman RAm Systems -- 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