TRISA = %00100000
TRISC.0 = 0
TRISC.1 = 0
led VAR PORTC.0
led2 VAR PORTC.1
butt1 VAR PORTA.5
counter VAR word
bcounter VAR word
counter = 0
bcounter = 0
'************************************************* ****************
loop:
high led2
pause 100
low led2
if butt1 = 0 then
high led
pause 100
low led
counter = counter + 1
endIF
if counter>5 then blink
goto loop
'************************************************* ****************
blink:
bcounter = bcounter + 1
high led
pause 500
low led
PAuse 500
if bcounter<5 then goto blink
counter = 0
goto loop
end
Bookmarks