> Newbie needs help. Below is my practice code. My Question is How come > that this run does not stop at idle. Everytime I put low or ground on > porta RA3 the led turns on then off again. And if I ground RA3 again > led turns on again. Looking at the code, I thought after the led turns > on program goes to idle and stays there. I'm probably missing > something simple here. Thanks for the help. w equ 0 f equ 1 porta equ 0x05 portb equ 0x06 start movlw 0xff tris porta movlw b'11111011' tris portb bcf portb,2 ;clear portb RB2 switch btfss porta,3 ;check porta RA3 if low goto switch ; not low -loop back to switch bsf portb,2 ; turn on led idle goto idle end