I'm trying to use the "time" command on a 20M2 with the Picaxe Editor version 6.0.8.11 but not having any luck. I used the example code from the manual
Monitoring the value of w0 I see 10 but B.0 in the simulator never goes high.
Running
shows W1 increasing as it should, but w0 is always 0. I've tried adding "setfreq", "disabletime" and "enabletime" comments, but still I don't see the value of "time" changing at all.
What don't I understand about the "time" comment? Why don't I see the value changing. Is it something at only works in hardware and that the simulator doesn't simulate? I know it's supposed to start when power is applied to the 20M2, but the simulator could start simulation of the counter when a program was run. But does it in fact do that? The simulator doesn't list "time" as one of the values it can display.
Code:
let w0 = time + 10
do
if time > w0 then
high B.0
end if
loop
Running
Code:
do
let w0=time
let w1=w1+1
pause 100
loop
What don't I understand about the "time" comment? Why don't I see the value changing. Is it something at only works in hardware and that the simulator doesn't simulate? I know it's supposed to start when power is applied to the 20M2, but the simulator could start simulation of the counter when a program was run. But does it in fact do that? The simulator doesn't list "time" as one of the values it can display.