multiple timers

I am working on a contraption that requires multiple timers . One is simply for an output to flash an LED when the unit is on. Another output to go high for 5 seconds every 5 minutes and another output to go high for one hour in 24.

Is this possible, and if so I would love a code snippet. I am using a 20M chip.
 

SAborn

Senior Member
Depending on your program loop and the amount of instructions that are done and the accuracy needed you could do something like increase a few sets of counters like.......

Code:
Pause 250
Inc counter1 '(b0) seconds
If counter1 = 240 then
inc counter2 '(b1) minutes
counter1 = 0
endif

if counter2 = 60 then
inc counter3 ' (b2) hours
counter2 = 0
endif

if counter3 = 24 then
counter3 = 0
endif
Or use a realtime clock if you want high accuracy
 
Thanks for the quick reply
Now that I have found out that the new M2 chips allow multi start, i will get some of these.

And my basic programming skills are very limited and therefore prefer Logicator. I will however, when I get some time, set up and play around with your code for better understanding.

thanks
Michael
 

westaust55

Moderator
Note that at this time (Dec 2010) only the 18M2 is available.

The 20M2 and 14M2 are future devices tentatively for release some time in 2011 as indicated in PICAXE manual 1.

2011 does not end around 375 days from now so lets hope this does not generate a flurry of "when are the 14M2 and 20M2 chips going to be released" posts.
 
Top