I recently started playing wiht a Toshiba T1 to run a renwable power house. It has a solar array, generator and can hook to the utility when they are on.
Depending on the source some loads are allowable and some not, and connection to the utility is minimised. Seemleess power is required to safeguard the house elcronics stuff.
The t1 also does a perimeter alarm and auto yard lights in its spare time.
Here is my problem;-
Once some process is under way, with timers and counters ticking away, the process may terminate in various ways ( eg manual buttons, power failure or the process times out)
When it does it will catch some timers and counters in mid- flight with some value remaining in the register.
Before the next instance of this process they need to be back to some ok initial values.
Right now, I figured this by trial and error and put 'MOV' instructions here and there to re-initialise these timer/counter registers for each input or outcome which could start or end the process.
It reached the point of inscrutable and un t-shootable ( but it DOES work for the moment.)
There most be a more elegant way of thinking and doing this?
Depending on the source some loads are allowable and some not, and connection to the utility is minimised. Seemleess power is required to safeguard the house elcronics stuff.
The t1 also does a perimeter alarm and auto yard lights in its spare time.
Here is my problem;-
Once some process is under way, with timers and counters ticking away, the process may terminate in various ways ( eg manual buttons, power failure or the process times out)
When it does it will catch some timers and counters in mid- flight with some value remaining in the register.
Before the next instance of this process they need to be back to some ok initial values.
Right now, I figured this by trial and error and put 'MOV' instructions here and there to re-initialise these timer/counter registers for each input or outcome which could start or end the process.
It reached the point of inscrutable and un t-shootable ( but it DOES work for the moment.)
There most be a more elegant way of thinking and doing this?