Timer SubRoutine
I'm using a 16f616 - but can be changed. I need to do 2 things at same time. I need a timer that has 2 stages - 1 minute on, 5 minutes off (controlling a relay). At the same time I need to monitor an analog voltage and be able to react to it while its timing.
Right now I'm trying a rather crude method by going to a sub routine that pauses 250 ms, adds a count to a variable, and returns. I keep track of 1 minute and 5 minutes that way by comparing to te variable. In same main, I'm doing the analog voltage monitoring.
Whats a better way to keep track of time? It does not have to be that accurate - 5% is ok..
My dad never liked you...
Bookmarks