BS1-IC help if you could
Gary Hoffmann
Posts: 10
Hello folks,
·
Looking at all these posts on here I am almost embarrassed to ask for help with my little (I guess ever so basic) project I am attempting to make to operate.· I have played with the BC1 about 8 years ago but since than have not had the chance to work/play with it again until now..
·
This is the project…· I am picking up a signal of a decoder board (remote door lock) .· There is only one pin of interest on this board and it either goes high or low and stays in that state, until the next lock/unlock command occurs.· This either high or low signal I would like to use to drive a transistor and related paraphernalia, it in itself also not a hard thing to do…
·
I have written the basic instructions as such that I have two inputs via dirs and 6 outputs…
Allow me to give a brief listing of where I am floundering…..
·
dirs = 0011111
·
if pin 0 = 0 than relay1
if pin 0 = 1 than relay1
·
relay1: high 5
Pause 1000
High 6
Pause 1500
Low 5
Low 6
·
Relay2:
·
High 4
Pause 1000
High 3
Pause 1500
Low 4
Low 3
·
·
Here is the problem…How can I stop the program from running continuesly once it “sees” a state of pin 0 ?· That is, the instruction should only be executed one time until another chance on pin 0 occurs.· The way it is now of course it runs and runs regardless of high or low on pin 0..··
·
Sorry guys/girls..basic stuff you say· ….
·
Thanks for the help
·
Gary
·
·
·
·
·
·
·
Looking at all these posts on here I am almost embarrassed to ask for help with my little (I guess ever so basic) project I am attempting to make to operate.· I have played with the BC1 about 8 years ago but since than have not had the chance to work/play with it again until now..
·
This is the project…· I am picking up a signal of a decoder board (remote door lock) .· There is only one pin of interest on this board and it either goes high or low and stays in that state, until the next lock/unlock command occurs.· This either high or low signal I would like to use to drive a transistor and related paraphernalia, it in itself also not a hard thing to do…
·
I have written the basic instructions as such that I have two inputs via dirs and 6 outputs…
Allow me to give a brief listing of where I am floundering…..
·
dirs = 0011111
·
if pin 0 = 0 than relay1
if pin 0 = 1 than relay1
·
relay1: high 5
Pause 1000
High 6
Pause 1500
Low 5
Low 6
·
Relay2:
·
High 4
Pause 1000
High 3
Pause 1500
Low 4
Low 3
·
·
Here is the problem…How can I stop the program from running continuesly once it “sees” a state of pin 0 ?· That is, the instruction should only be executed one time until another chance on pin 0 occurs.· The way it is now of course it runs and runs regardless of high or low on pin 0..··
·
Sorry guys/girls..basic stuff you say· ….
·
Thanks for the help
·
Gary
·
·
·
·
·
·
Comments
state0:
' do something as long as pin 0 is low
if in0 = 0 then state0 ' stay here if pin 0 low
action0to1:
' do something once for each leading edge of a pulse on pin 0
state1:
' do something as long as pin 0 is high
if in0 = 1 then state1 ' stay here if pin 0 high
action1to0:
' do something once for each trailing edge of a pulse on pin 0
goto state0
Thank you for your note. I will check it out in the next few days as time permitts and let you know. Thanks for the fast reply
Gary
Got some time this evening to get back into this "issue".· Here is what I have chanced and still no difference ....
Dirs = %00001111
Start: If PIN0 = 0 then relay1
relay1: Pause 1500···· 'just a pause for me to get ready to "see"..
HIGH 4
Pause 1500
HIGH 5
PAUSE 1500
LOW 4
LOW 5
IF PIN0 = 1 THEN Relay2·· 'This is supposed to be the "conditional" statement where I hoped the program would stop and wait
··································· 'until or if said state is reached.
This is not the case, the Controller continues happy as can be on its way to toggle the pins 4 and 5 as long as pin0 is held low...If I force pin0 high as in "IF pin0 = 1 then relay2...nothing happens.· Basically I repeated the
"relay1" routine only that I had a very short pause, so that I can see the transition on the scope..
Any thoughs ???
Thanks
GH