Marcel van Lieshout wrote: > Yes, the sample was for 18F452. > > I understand that the hardware must read the port to being able to execute > the xor. Would this be a problem? Yes, depending on how you are loading the pins, the value that you read, might not be what you wrote last time. You could do comething like : movf latd, w xorlw x'03' movwf port (or movwf latd, it doesn't matter...) or movlw 3 xorwf H'F8C' (F8C is LATD, F83, as before, is PORTD.) or (better) movlw 3 xorwf LATD Have fun ! Jan-Erik. -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body