you may like to re-examine that I just tried it on a pic1845k20 @64 MHz and the int is @2.5mS as expected , sheldons mod just adds 100th capability doesn't it ?
the seconds inc on every 400th interrupt the ticks are not meant to be 10mS
you may like to re-examine that I just tried it on a pic1845k20 @64 MHz and the int is @2.5mS as expected , sheldons mod just adds 100th capability doesn't it ?
the seconds inc on every 400th interrupt the ticks are not meant to be 10mS
Last edited by richard; - 23rd December 2014 at 05:57. Reason: better explanition
From http://web.archive.org/web/201206151...8/elapsed.html
But a tick is not 2.5ms.The time is kept in the variables:
--------------------------------------------------------------------------------
Ticks var byte ' 1/100th of a second
Seconds var byte ' 0-59
Minutes var byte ' 0-59
Hours var byte ' 0-23
Days var word ' 0-65535
Robert
What happens when you start/stop the timer after 5 ticks using the original include?
I get this using the new include:
RobertCode:MainProgram: if T1CON.0 = 0 then PortD.3 = 1 GOSUB StartTimer endif if OneHundreth = 5 then PortD.3 = 0 GOSUB StopTimer ' Stop the Elapsed Timer GOSUB ResetTime ' Reset Time to 0d-00:00:00.00 endif goto MainProgram
its a clock not a stopwatch , if you really need to measure wee small times like that there are better ways.
to get the fractional part of the seconds multiply t1post with ticks and / 4
Bookmarks