----- Original Message ----- From: "Keong" > Eg of a correct case, 'w' is received on VB and the > data lines are '01110111'. Hence I will like to find > out does polling of the PORTB using movf PORTB,will > have any hidden implications? > > Thank > > Poll bcf STATUS,RP0 ; selecting bank0 cos > PORTB in bank 0 > movf PORTB,W ; polling of PORTB > movwf Result ; move current > state to general register Result I assume you want the result register to act like a latch and have the bits stay high even if the input pin goes low again? If thats what you want, then by doing "movwf Result" you are clearing what was already in the result register. It looks like you've got the right idea with the "iorwf result,F" so you can just leave the other line out. Poll bcf STATUS,RP0 movf PORTB,W iorwf Result,F -- Jon Baker -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body