At first glance, replace the "goto inicio" at the end of the program with "return" (it was called under a "gosub").
At first glance, replace the "goto inicio" at the end of the program with "return" (it was called under a "gosub").
No, I'm not Superman, but I did stay at a Holiday Inn Express last night!
I got 2 problems 1 de led dont turn of afther the periode and 2 i need the code to do like a cicle and stops when led off and only start again when "switch" 1 is on again.
Fixed by post above?
Ok, so how do you determine if the LED is off?and 2 i need the code to do like a cicle and stops when led off and only start again when "switch" 1 is on again.
How do you determine if 'switch 1' is on again?
If you can answer those 2 questions, then you should be able to write your code.
Hi, not fixed.
determine LED - i do not now if i anderstand you well (bad Inglish mine) but by having switch2 pressed led if off. (or if switch1 pressed is off to)
'switch 1' - I only put this switch to try to stop the code there from looping and looping because i only want that led is high 1 time at the time (just when switch1 be pressesd again), then wait for switch2 to be not pressed.
Thanks
One more thing...
Turn the WDT OFF since your not clearing it.
Ex:@ DEVICE pic16F877A, WDT_OFF ' Watchdog Timer off
No, I'm not Superman, but I did stay at a Holiday Inn Express last night!
The compiler handle it for you![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hi, Camolas
1) some contradiction ...
" text " tells :
if input1 = 1 THEN
WAIT for INPUT2 = 0 == WHILE INPUT2 = 1 : WEND ( loop if INPUT2 = 1 )
WAIT 40s == PAUSE 40000 ... not 200 !
LED ON for 3 s
LED Off
LOOP
the program shows input levels inverted ... ( may be active low pushbuttons ??? did you think to the pullup ? )
I think the first thing for you is to look at the different states ... and write succession of operations in order, more than write lines and try to make them work together.
That's called an ORGANIGRAM ... ( joined an example )
Now, I've almost written your program ... just translate it into PbP commands ( I gave you the "difficult part" command ... )
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Thas i need to put WDT OFF or not?
Yes im going to use low pullup pushbuttons rhas i have to do one more line code for it?
Im very confuse![]()
I wouldn't worry about it...
Sounds like you might need to back up a bit and work on the simple stuff first, i.e. make the blinky LED, make the LED follow a single button under SOFTWARE CONTROL, and so on and so on...build up to what you need.Yes im going to use low pullup pushbuttons rhas i have to do one more line code for it?
This 'jumping in with both feet' approach doesn't seem to be working out too well...
Bookmarks