I want to create a simple timer circuit using a Picaxe 08, and I would normally do so by creating a loop, with a pause in it, which increments a variable by 1 on each loop. The size of the pause would be varied by trial-and-error to get something approximating 1 second for each loop.
I see now that there's an enabletime and disabletime command available for the 08M2 chip, but I can't figure how to use it. I've created a loop, as per the example in the manual, but instead of debug I've put a line "if time > 60 then light_on", where light-on: is "high 0" followed by "goto countup" (the start of the main loop). It doesn't do anything when I used the simulator.
So, how do I use the time variable to activate a subroutine, and what's the advantage (if any) of using time rather than just looping and incrementing by 1?
I see now that there's an enabletime and disabletime command available for the 08M2 chip, but I can't figure how to use it. I've created a loop, as per the example in the manual, but instead of debug I've put a line "if time > 60 then light_on", where light-on: is "high 0" followed by "goto countup" (the start of the main loop). It doesn't do anything when I used the simulator.
So, how do I use the time variable to activate a subroutine, and what's the advantage (if any) of using time rather than just looping and incrementing by 1?