Hi,

Thanks for the starting hellp

PicbasicPro 2.50





My code

@ DEVICE pic16F877A, WDT_ON ' Watchdog Timer
@ DEVICE pic16F877A, PWRT_ON ' Power-On Timer
@ DEVICE pic16F877A, BOD_ON ' Brown-Out Detect
@ DEVICE pic16F877A, LVP_OFF ' Low-Voltage Programming
@ DEVICE pic16F877A, CPD_OFF ' Data Memory Code Protect
@ DEVICE pic16F877A, PROTECT_OFF ' Program Code Protection
@ DEVICE pic16F877A, WRT_OFF ' Flash Memory Word Enable

TRISB.0=1
TRISB.1=1
TRISC.7=0
LED var PORTC.7

inicio:

if PORTB.0 = 0 then
GOSUB liga
else
low LED
endif
goto inicio

liga:
if PORTB.1=1 then
high LED
PAUSE 200
low LED
else
low LED
endif
goto inicio


end