Welcome to the forum.
Maybe this will get you started.
Code:CHECK: high mosfet IF boton = 0 THEN TEST GOTO CHECK TEST: cnt = cnt +1 IF cnt = 3 THEN OFF_LED RETURN OFF_LED: cnt = 0 low mosfet pause 1000 GOTO CHECK
Welcome to the forum.
Maybe this will get you started.
Code:CHECK: high mosfet IF boton = 0 THEN TEST GOTO CHECK TEST: cnt = cnt +1 IF cnt = 3 THEN OFF_LED RETURN OFF_LED: cnt = 0 low mosfet pause 1000 GOTO CHECK
Dave
Always wear safety glasses while programming.
Thanks Dave!!! grate stuff!!!
I will post the results later on.
Thanks again.![]()
What exactly is happining?
Dave
Always wear safety glasses while programming.
now to show off my newbieness. If that is the entire program, won't he need SOME sort of init type stuff? setup tris,osc,...? something?
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
TRIS is taken care of in the HIGH/LOW commands.
The vars will need defined. The OP had that.
DEFINE the OSC and set the configs someplace. Figured the OP had those too. Seemed the code was running, just not running as expected.
Dave
Always wear safety glasses while programming.
DOH!!
That chip has an ADC I think.
Add
ANSEL=%00000000
http://www.picbasic.co.uk/forum/showthread.php?t=561
Dave
Always wear safety glasses while programming.
Is If_then a goto or gosub? I am used to it being a goto unless gosub is called out. But I clearly haven't read my PBP book yet. - sorry
If goto then return will break the code - yes?
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
Bookmarks