Quote Originally Posted by peterdeco1 View Post
I've used this method. I used FINISHED instead of END just in case you want to add a line that begins the cycle over again with an input switch.


X VAR BYTE
CLEAR

START:
HIGH LED : PAUSEUS 50000 : LOW LED : PAUSEUS 50000 : LET X = (X + 1)
IF X < 10 THEN START

FINISHED:
'IF PORTA.0 = 1 THEN CLEAR : GOTO START
GOTO FINISHED
It only flashes once when the button is pressed. I want to get it so that when I press it the first time, it flashes the led once, press it again, and it flashes the LED twice, and so on.

My initalization is this
DEFINE OSC 8
OPTION_REG = %0000000
ANSEL = 0
ADCON0 = 0
CMCON0 = 7
TRISIO = %00111011
WPU = %00011010
A0 var byte
X var byte
button1 var gpio.1
led var gpio.2