Hello all,
A few questions about the SCTimer. I've read the cookbook but some details are unclear.
In my project I'm using the SCT on an LPC812. I'm using three states, 0,1 & 2.
In state 0 the LPC waits for a rising edge on the input, once it does it moves to state 1.
In state 1 the LPC waits for a timer to reach a particular value & once it does the output is driven high.
In state 2 the LPC waits for a falling edge on the input, once it does it should drive the output low & return to state 0.
As you can see the timer is only really used in state 1.
My questions are then:
1. Should the timer only be started & stopped in state 1, or should it be started once all events & states are defined & left running?
2. The states above should run sequentially i.e. 0 -> 1 -> 2 -> 0 etc. & individually, i.e. the state 0 & state 2 actions should not occur at the same time. Does this happen by default on the perhieral or does it need to be implemented by the programmer?
Many thanks,