I am confuse with the following code, because it didn't work as expected. Perhaps I am missing something. Can somebody on the list please correct my mistake. Thanks in advance. WH Tan PAGE0_START ORG 0x0000 ; RESET vector location GOTO START ORG 0x0004 MOVWF W_TEMP SWAPF STATUS, W MOVWF STATUS_TEMP BCF INTCON, GIE ;Is this code is a must, or ;PIC will do it for me? BTFSC INTCON, RBIF ; Check is RB change ISR? GOTO ISR_RBIF ; Yes GOTO END_ISR ; No ISR_RBIF BTFSC PORTB, 7 GOTO BIT_7 BTFSC PORTB, 6 GOTO BIT_6 BTFSC PORTB, 5 GOTO BIT_5 BTFSC PORTB, 4 GOTO BIT_4 GOTO END_ISR END_ISR SWAPF STATUS_TEMP, W MOVWF STATUS SWAPF W_TEMP, F SWAPF W_TEMP, W BCF INTCON, RBIF BSF INTCON, GIE ; Again, is this code necessary? RETFIE BIT_7 ; Send send some character to LCD ; to indicate a change on RB7 .... GOTO END_ISR BIT_6 ~ BIT_4 ; Do exactly same as BIT_7 -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body