Author Topic: Accurate Timing  (Read 4069 times)

0 Members and 1 Guest are viewing this topic.

Offline Camdenmil

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 121
  • Rating: +4/-0
    • View Profile
Accurate Timing
« on: September 21, 2011, 09:07:07 pm »
Does anyone know a good way to keep time in axe? I tried making an axiom for the crystal timers but axe doesn't seem to support interrupts for anything except the hardware timers which can be a bit inaccurate. Would it be safe to define an interrupt in axe and then have the axiom turn off the hardware timers?
It is bad luck to be superstitious.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Accurate Timing
« Reply #1 on: September 21, 2011, 09:14:03 pm »
I know you can make an Axiom to control crystal timer-based interrupts, because I've done it before. But how fast do you need the timer to be? Because the hardware timers on the 15MHz calculators are actually based off the crystal timers and run at extremely precise speeds. If you just need to keep accurate time over a long period rather than do something many times a second with precise intervals in between, you should be just fine with the hardware timers. The exact speeds the hardware timers run at can be found here: [wikiti]83Plus:Ports:04[/wikiti]. The most regular speed is with the hardware timer set at the fastest setting (0) on a 15MHz calculator, which will run at (almost) exactly 512Hz.
« Last Edit: September 21, 2011, 09:14:30 pm by Runer112 »

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Accurate Timing
« Reply #2 on: September 21, 2011, 10:05:41 pm »
on a 15MHz calculator, which will run at (almost) exactly 512Hz.

Seconded, I made a stopwatch with that timer. And it's accurate to .01 over a few hours.
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Accurate Timing
« Reply #3 on: September 21, 2011, 10:15:02 pm »
on a 15MHz calculator, which will run at (almost) exactly 512Hz.

Seconded, I made a stopwatch with that timer. And it's accurate to .01 over a few hours.
You mean the timer I ran for what I'm sure is a total of >3 hours timing stuff for school wan't 100% accurate?! ;) Is the new one 100% accurate, or is it inaccurate as well?

Offline Camdenmil

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 121
  • Rating: +4/-0
    • View Profile
Re: Accurate Timing
« Reply #4 on: September 21, 2011, 11:00:56 pm »
So the hardware timers in the 84 are based on the crystal. Although how would you make an axiom for the crystal timers? I thought the hardware timers were inaccurate because the ones on the 83 run at weird speeds. <_<
« Last Edit: September 21, 2011, 11:04:56 pm by Camdenmil »
It is bad luck to be superstitious.