Hi!! Can anyone tell me what's wrong with this part of my program?? ; Wait for doors closed AND doors locked. WAIT2 MOVF PORTA, W ; get port A into W ANDLW b'00000100' ; check RA0(doors closed), RA1(doors locked) and RA2(ignition off) BTFSC STATUS,Z ; skip when result is zero GOTO WAIT2 As you see am I taking porta into W, and it is supposed to go forward in my program only if porta is 00000100 but that isn't the truth... It's always continuing with the program and never goes back to WAIT2. I have also tried with SUBLW but that didn't work either... With the SUBLW function did I also try with BTFSS instead of BTFSC and then did it loop in WAIT2 for ever.. I'm glad if anyone can help me with this. Andreas