If you don't want to create your own timer. You could use DT's "Elapsed Timer" include . Then monitor the minutes like towlerg suggested.
http://www.picbasic.co.uk/forum/show...light=dt+timer
Maybe like this?
Code:Include "Elapsed.pbp" Ticks var byte ' 1/100th of a second Seconds var byte ' 0-59 Minutes var byte ' 0-59 Hours var byte ' 0-23 Days var word ' 0-65535 Gosub ResetTime ' Reset Time to 0d-00:00:00.00 Gosub StartTimer ' Start the Elapsed Timer MainLoop: Read ADC If minutes =0 then Relay on endif If minutes =1 then Relay off endif If minutes = 6 then Gosub ResetTime 'Reset to 0 minutes endif MainLoop




Bookmarks