Searching \ for 'loops' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=loops
Search entire site for: 'loops'.

Truncated match.
PICList Thread
'loops'
1997\06\27@001000 by Fred T.

flavicon
face
> 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

1997\06\27@104113 by Mike Smith

flavicon
face
{Quote hidden}

Maybe the watchdog timer is enabled?  This would cause resets every
Watchdog interval, but you wouldn't notice it until the led got activated.

MikeS
<mikesmith_ozspamKILLspamrelaymail.net>

More... (looser matching)
- Last day of these posts
- In 1997 , 1998 only
- Today
- New search...