This I believe is my very first post and I am new to the Picaxe family of chips. I will try to explain what I am trying to do.
Here is my code so far:
What I am attempting to do is when pin3 = 0 (logic low) run the Unlock. I know I can use a PulseOut as well as other combinations to get a pulse out on pin4. However, I just want a single shot pulse out and not have the routine repeat over and over as long as pin3 is low. Right now I am unsure of the pulse width I will actually need but a guess would be between 200 to 500 mSec.
When pin3 again cycles from High to Low I would like things to repeat but not before pin3 has gone from a High to Low state.
I am very new to PICs but not new to electronics in general. The output pulse on pin4 will interface to a mosfet to drive a solenoid. I just can't figure out how to get the desired results.
Thank You very much for any help with this.
Ron
Here is my code so far:
Code:
main:
if pin3 = 0 then UnLock
goto main
UnLock:
for b0 = 0 to 0
if pin3 = 1 Then Exit
high 4
pause 200
low 4
pause 500
next b0
pause 1000
goto main
When pin3 again cycles from High to Low I would like things to repeat but not before pin3 has gone from a High to Low state.
I am very new to PICs but not new to electronics in general. The output pulse on pin4 will interface to a mosfet to drive a solenoid. I just can't figure out how to get the desired results.
Thank You very much for any help with this.
Ron