Hi all I am working with simple led on off swich and I can not make it work. Please explaine . +----------+ 5v | | | 10k 16c84 |_| -------+ | porta | | / as |+-----+-----/ +---|+ gnd input | PORTA BIT1 | ;--------------------------------- porta equ 05 portb equ 06 ;--------------------------------- MOVLW B'11111111' ; MAKE PORTA INP UT TRIS PORTA ; DO IT MOVLW B'11111011' ; MAKE PORTB BIT 2 OUTPUT TRIS PORTB ; DO IT LOOP BTFSS PORTA,1 ; SKIP IF IT IS 1 BCF PORTB,2 ; CLEAR PORTB BTFSC PORTA,1 ; SKIP IF IT IS 0 BSF PORTB,2 ; TURN L ED ON GOTO LOOP ; JUMP END THA WAY I WANT TO MAKE IT WORK IS WHEN I PUSH THE BUTTON LED STAYS ON UNTIL I PUSH IT AGAIN TURNS OFF. RIGHT NOW IF I PUSH THE SWICH IT WILL TURN ON BUT WHEN I REALICE IT WILL TURN OFF. PLEASE TELL ME WHAT IS WRONG? THANK YOU ANDRE _____________________________________ / /\ / Andre Abelian 818.840-0003 / /\ / Data Image Technology _/ / / andreabelian@earthlink.net / \/ / 1128 Alameda Ave.ste 4 /\ / Glendale CA 91201 / / /____________________________________/ / \____________________________________\/ \ \ \ \ \ \ \ \ \ \ \ \ \