SetTimer Command ?

marky26uk

New Member
Hi all,
I've just been messing with the settimer commmand for the first time, i got it working to increment each time a second passes.
I found it's not very accurate, the seconds lag after only about 10 seconds has passed.
Is this normal ?

Thanks guys,
Mark
 

Technical

Technical Support
Staff member
The timer is fairly accurate, but is affected by other commands.

As the timer is interrupt driven, it needs to be temp. disabled during very timing sensitive events (e.g. serial communications like debug/sertxd/serout etc). If it wasn't, then the serial timing would be out and wouldn't work - it's all a compromise on performance v accuracy.

So if you just timer by itself with simple high/lows etc. it should be fairly accurate. However if you do other timing sensisive things at the same time it may lag a bit.
 

marky26uk

New Member
Settimer issue

Hi Technical,
I see, i'm sending serout to my lcd to display the seconds so this why it's lagging.

Thanks for the reply,
Mark
 
Top