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
Bookmarks