But1 make rel1 high at first push and low at second push.
But2 make rel2 high at first push and low at second push.
It is possible this :
-but1 make rel1 high at first push and low when push second time but1 OR push but2 ?
-but2 make rel2 high at first push and low when push second time but2 OR push but1 ?
So, rel1 ON with but1 , and OFF with but1 OR but2 ; rel2 ON with but2, and OFF with but2 OR but1. Hope now You understand me;I am really verry sorry for my poor english...
Thank You !
....me again. This is my working variant !
In check: procedure I write this :
if rel1 = 1 and but2 = 1 then
low rel1
pause 500
goto Btn1PressDone:
endif
if rel2 = 1 and but1 = 1 then
low rel2
pause 500
goto Btn2PressDone:
endif
In ISIS don't work, but in fact yes ! I don't understand why, but...Maybe You have another variant, much better; it's a good way to learn more. Still don't know if rel (1 or 2) stop if overload detected, only AFTER checking this overload for 5 times...
Last edited by fratello; - 24th July 2009 at 08:14. Reason: ...not so young but restless ... ;)
OK, I see what you mean now.
Try this ...
And yes, the check: routine seems to work "only after 5 times".Code:btn1: 'actionare buton up if but1=1 and rel2=0 then high rel1 pause 20 while but1=1 call check wend pause 20 while but1 = 0 AND but2=0 call check if rel1=0 then GOTO Btn1PressDone endif wend LOW rel1 while but1=1 OR but2=1 wend pause 20 endif Btn1PressDone:
DT
I am speechless...THANK YOU VERRY MUCH ! Works like a charm ! Great job, You are verry, verry good in this...
Great forum, I am proud for visiting him. All the best for everyone, wherever you are !
I have tested this module on my car ; works verry fine, like I expect.Since this will be use on car, I think this is one good ideea to minimize the consumption.So I try to write something...Please take one advice...Thanks !
I think it might be better to ...It looks like you have correctly set-up the pic to wake from sleep on PORT change (either switch).Code:main: rel1=0 rel2=0 @ sleep pause 100
So then it wakes up ... drives the motor relays as necessary ... and only after the motor is finished, and no buttons are pressed, go back to sleep.
The two NOP's are only required if it will be jumping to an Interrupt vector on wake up.
Yours is just continuing where it left off.
Hmmm, sounds like a powered antenna driver. ??
<br>
DT
Thanks for reply ! I KNOW that YOU are right. ...Now my car has "intelligent" windows!
...I think to 'implement' the detection of 'long press button/short press button', but after one short holidays...All the best !
Bookmarks