Hi everyone..
I'm new in this forum and I hope u guys can help me to solve my problem. I'm try to do a coding for button by using PICF4620 but there is an error.I also not sure whether my program is right or not because this is the first time i'm using Pbasic.
Here the program:
define osc 25
define INIT_ADCON2=0
define INIT_TRISA.2=0
DEFINE INIT_ADCON0=1
DEFINE INIT_TRISB.0=1
DEFINE INIT_ADCON1=1
DEFINE INIT_TRISB.1=1
LED VAR porta.2
BUTTON0 VAR portb.0
BUTTON1 var portb.1
main:
high BUTTON0=1
high LED ;led is ON
pause 600
low LED ;led is OFF
pause 600
high BUTTON1=1
high LED ;led is ON
pause 600
low LED ;led is OFF
pause 600
goto main




Bookmarks