Tvmender
Active member
Hi All
I am struggling to get background timing to work on the 20M2. It needs to decrement a variable every 1 second.
I basically need a timer running in the background which decrements a given value once per second and its checked by the main program to see if a set time has elapsed. The main program is off doing what I call housekeeping tasks such as checking inputs, sending serial data to an IR LED, updating an LCD and checking on to see if the timer has reached zero.
I know there is the "time" function which I am struggling to get to work.
Whats the best direction for creating a background timer which is unaffected by the main program? Parallel tasks are not working for me due to the changes in processing speed when the main program performs certain housekeeping tasks (it either speeds up or slows down).
Still getting to grips with PICAXE, be gentle!
I am struggling to get background timing to work on the 20M2. It needs to decrement a variable every 1 second.
I basically need a timer running in the background which decrements a given value once per second and its checked by the main program to see if a set time has elapsed. The main program is off doing what I call housekeeping tasks such as checking inputs, sending serial data to an IR LED, updating an LCD and checking on to see if the timer has reached zero.
I know there is the "time" function which I am struggling to get to work.
Whats the best direction for creating a background timer which is unaffected by the main program? Parallel tasks are not working for me due to the changes in processing speed when the main program performs certain housekeeping tasks (it either speeds up or slows down).
Still getting to grips with PICAXE, be gentle!