Hello,
I am new to microcontrollers and have never used one. I do not currently own a Picaxe but I might buy one if it can do what I want it to do.
Here is how I want the Picaxe to function:
Note: My input signal can be high or low. I have either option, but for this example let's just assume it will be high.
Also, the input signal will be provided through relay contacts, so switch bounce may need to be taken into account?
Sounds pretty simple right? It would be except I need both time delays to be "pauseable". If the input signal goes low during either time delay, I need the chip to stop counting and wait for the input to go high again and then resume the delay where it left off. It doesn't need to be extremely precise. It's ok if I lose 200 milliseconds or so, but it can't be say a half-second off. Is this something that can be done with a picaxe? Maybe it's simple? I do have some programming experience so code doesn't scare me. Maybe it can save the time passed in a variable every 100 milliseconds or something like that so that it knows where it was?
Also, if it is possible to use a Picaxe for this, how many pins will I need on my chip? Will 8 pins be enough?
Lastly, I read that the Picaxe uses it's clock frequency for time delays or "pause" commands. Is this clock generated internally to the chip or do I need an outside clock source? (Again, I'm new to this)
Any help would be appreciated.
Thanks!
I am new to microcontrollers and have never used one. I do not currently own a Picaxe but I might buy one if it can do what I want it to do.
Here is how I want the Picaxe to function:
Note: My input signal can be high or low. I have either option, but for this example let's just assume it will be high.
- When the input signal goes high, a first time delay starts of around 2.25 to 2.75 seconds (The timing of which can be adjustable with a Potentiometer). Output pin stays low during this time
- After the first time delay, Output pin goes high and a second time delay of around 3.75 to 4.75 seconds starts (This timing also adjustable with a second Potentiometer).
- After the second time delay, Output pin goes low.
- Then Resets for another loop waiting for the input signal again.
Also, the input signal will be provided through relay contacts, so switch bounce may need to be taken into account?
Sounds pretty simple right? It would be except I need both time delays to be "pauseable". If the input signal goes low during either time delay, I need the chip to stop counting and wait for the input to go high again and then resume the delay where it left off. It doesn't need to be extremely precise. It's ok if I lose 200 milliseconds or so, but it can't be say a half-second off. Is this something that can be done with a picaxe? Maybe it's simple? I do have some programming experience so code doesn't scare me. Maybe it can save the time passed in a variable every 100 milliseconds or something like that so that it knows where it was?
Also, if it is possible to use a Picaxe for this, how many pins will I need on my chip? Will 8 pins be enough?
Lastly, I read that the Picaxe uses it's clock frequency for time delays or "pause" commands. Is this clock generated internally to the chip or do I need an outside clock source? (Again, I'm new to this)
Any help would be appreciated.
Thanks!