Rpbasic-52 programming guide, Tick – Remote Processing BASIC 52 User Manual
Page 131

RPBASIC-52 PROGRAMMING GUIDE
2-112
TICK
Syntax:
T I C K (timer)
Where: timer = 0 to 3. It specifies the tim er numbe r.
Function:
Returns a time from one of 4 process clocks in 5 ms increme nts.
Mode:
Comm and,Run
Use:
A = TICK(2)
Cards:
All
D E S C R IP T I ON
There are four tick timers updated 200 times per second. Each timer is independent of each other in that they
may be read and cleared separately (see CLEAR TICK). All timers are updated at the same time.
This function is separate from the real time clock and is not battery backed. All timers reset to 0 on power up
or reset. Timers c ontinue to run in co mma nd mode and cannot b e turned off.
TICK(n) returns time in thousandths of a second (in 5 ms intervals) up to 65535.995 seconds, or
approximately 18.2 hours. The timer then starts at 0 again.
Tick timers are not affected by to the ONTICK instruction.
RELATED
C L E A R T I C K , O N T I C K
ERRORS
B A D S Y N T A X
If any parameters left out
B A D A R G U M E N T When timer > 3 or negative or left out
EXAMPLE
The following example clears tick timer number 3, delays for a time, then prints tick timers 0 and 3.
10 CLEAR TICK(3)
20 FOR X = 0 TO 1000
30 NEXT
40 PRINT TICK(0),TICK(3)
124.6 .425