I have need to measure a pin delay of a couple of seconds with a 20m2. I need mS resolution but not mS accuracy.
If I had an X2 I could use timer3, but I don't - so how do I do it?
I tried using a pause statement, terminated by an interrupt.
setint input,mask
pause 10000 ' times out at 10 secs, but drops on interrput
w3 = 10000 - whats_left
Its possible that 'whats_left' is in a register somewhere?
Also found:
Any thoughts, tricks or suggestions?
If I had an X2 I could use timer3, but I don't - so how do I do it?
I tried using a pause statement, terminated by an interrupt.
But I have found no way of reading the remaining elapsed time.In the case of the interrupted pause, wait, play or tune command, any remaining time delay is ignored and the
program continues with the next program line.
setint input,mask
pause 10000 ' times out at 10 secs, but drops on interrput
w3 = 10000 - whats_left
Its possible that 'whats_left' is in a register somewhere?
Also found:
Is there a readable prescaler that drives this timer? That would help a lot!The M2 series have an internal elapsed time counter. This is a word variable called
‘time’ which increments once per second.
Any thoughts, tricks or suggestions?