timer question

TheChief

Senior Member
Simple question but I must be missing out on some basic theory.
I have a 20x2 and want to display the value of the "timer" command for debug purposes. I have tried using "timer" as a variable but I get no value returned. I see if Issue the debug command I can see a variable named timer3. I'm slightly confused. Is it because I'm using the timer command in a loop that it shows timer3 ?
 

eclectic

Moderator
Try this please

Code:
; modified from M.2, p.224
#picaxe 20X2
settimer t1s_8
main:
pause 1000 ; wait 1 second
sertxd (#timer," ")
goto main ‘ loop
e
 

SAborn

Senior Member
As Electric shows you need to use the " settimer t1s_8 " command to start the timer before you can use it, have you done that??
 

TheChief

Senior Member
Thanks guys, was certainly half asleep when I was looking at this.
Yes the "#timer" instead of "timer" was correct.
And yes I now see the "timer" variable in the bottom of the debug window.
Also I had managed to set the resolution incorrectly "settimer t1s_4" instead of "settimer t1s_8":(
 
Top