>This is how I do it:=0D > =0D >The C-code:=0D >portD ^=3D 0x03;=0D > =0D >The generated assembler:=0D >movlw 3=0D >xorwf H'F83'=0D > =0D >So, I was already using his samplecode. PortD is never read.=0D =0D xorwf is a READ-modify-write instruction. So PORTD is read every time you negate those pins.=0D =0D However, you shouldnt be using PORTD, but LATD register. When reading POR= TD on PIC18's the pin status will be returned. So, you may get your data corrupted. When reading LATD the last written data is returned.=0D =0D Try the following:=0D =0D LATD^=3D0x03;=0D =0D or, assembly:=0D =0D movlw 0x03=0D xorwf LATD=0D =0D This is supposed to work.=0D =0D Lucas Hartmann -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body