> 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
bcf portb,2 ;clear portb
switch btfss porta,3 ;check porta RA3 if
goto switch ; not low -loop
back to switch
bsf portb,2 ; turn on led
idle goto idle
Maybe the watchdog timer is enabled? This would cause resets every
Watchdog interval, but you wouldn't notice it until the led got activated.
More... (looser matching)
- Last day of these posts
- In 1997
, 1998 only
- New search...