Omnimaga
Calculator Community => TI Calculators => Calculator C => Topic started by: _player1537 on August 29, 2010, 12:02:11 pm
-
Is there something to return the time on the Nspire? Like a function, or a ram area or something?
-
Yeah, there are memory mapped timers. See here (http://hackspire.unsads.com/wiki/index.php/Memory-mapped_I/O_ports#900D0000_-_Second_timer)for the addresses. I haven't used the timer, though.
-
There is also an RTC documented here: http://hackspire.unsads.com/wiki/index.php/Memory-mapped_I/O_ports#90090000_-_Real-Time_Clock_.28RTC.29
-
Ok, so what I need it for is to start at 0, and count up, and then check it later. It seems like I'm going to need to set the bits like this (although I don't know how to in C):
900D0014 (location)
Bits:
00001111
That should: Run the timer, increase timer (instead of decrease), and run infinitely. Is that correct?
Edit: actually, it looks like ExtendeD posted closer to what I wanted :) But I still don't know how to read from that spot :/
-
int time = *(volatile unsigned*) 0x90090000
Be warned that this clock cannot measure any interval less than 1 second long.
-
Oh... ok. I'll keep this information, I don't think I'll need it just yet, but I might have an idea for a game using this :D