RonHackett
Member
I've been playing around with the 20M2 Time variable, and I'm getting some strange results. In Section 2 of the PICAXE Manual (enabletime and disabletime docs) it states that the time variable will increment at speed multiples at 8MHz and 16MHz, i.e., twice as fast (compared to 4MHZ) at 8MHz and four times as fast at 32MHz. However, at 8MHz I find that it increments twice as SLOWLY (i.e., every 2 seconds), and at 32MHz it increments only twice as fast (every 0.5 seconds), not four times as fast.
So, I'm hoping the Manual is in error, yes?
Code:
setfreq M8
time = 0
do
w0 = time + 1
sertxd (#time,cr,lf)
tarry: if w0 > time then tarry
loop
Last edited: