Quote Originally Posted by lilimike View Post
Some days I feel dumber than others and today is one of those!


All I really need is to have a counter that counts the minutes up to 720 and then cycle to 0 and start over endlessly. I don't need an interupt as I can test compare by branching from the main loop (in one minute I have plenty of time to test) Accuracy is not really important + or - 10 minutes over 720 is ok. I am already using timer0 so I guess I need to use timer1 or timer2.
Mike
Hi Mike,
Welcome to My World!
Code:
counter var byte
minutes var word
clear  ' zero variables at start
loop:

PortB  = %00000000
TRISB  = %00000000
counter = counter + 1
Pause 1000
If counter >= 60 then minutes  = minutes + 1 : counter = 0

if minutes >= 720 then gosub action
goto loop

Action:
minutes = 0
Toggle PortB.1 ' change this to do what you need done
return
A great clock this will not be, it does (should do) what you asked, you may need to juggle the numbers if you have a bunch of code to stuff in.