Quote Originally Posted by aratti View Post
Code:
Led var portX.x

A0 var Byte

Loop:
For A0 = 1 to 10
Toggle Led
Pause 50000
next A0
'comment the 3 lines hereunder for only ten flashes (leave the END)
Low Led
Pause 5000
goto Loop

end
This Example will flash led ten times. Led will turn off for 5 secs and flashing will repeat.
Hope it is what you need.

Happy new year

Al.
when I write

main:
If button1 = 0 then test
goto main

test:
for a0 = 1 to 10
toggle led
pauseus 50000
next a0
low led
pauseus 50000
goto main

What happens is the led only flashes 4 times. I am using a 12F683 @ 8mhz OSC