Re: A86: Time


[Prev][Next][Index][Thread]

Re: A86: Time




The system clock is generated by an RC network, so accuracy over any
significant period is pretty much a lost cause.
Pulling either linkport line low freezes the
display - On the assumption that this is an interrupt being asserted
the port could be driven with a low duty cycle clock and the interrupt
vector redirected to a counting routine. Interrupt latency is still
gonna mess you up, though, depending on how accurate over how long.
Of course you need to know where the interrupt vectors are ...
Another possibility is a hardware timer
stashed inside the calc - There's room in my 83 for a PIC and a xtal,
accessed with the linkport. Something like pulling one line low starts
the timer - Pull the other line low stops it, and then the PIC outputs
a series of bytes which represent how many timer ticks have occurred.

Jack

Cassady Roop wrote:
> 
> Is there any way of accessing the CPU clock from a program?  I'm
> assuming that there IS a clock chip buried in my calc's guts
> somewhere...
> 
> I have made a couple clock and event-timer programs in Basic and would
> like to convert them to Asm.  They use loops to get a fairly accurate
> idea of hours, minutes, and seconds.  I could use loops in the Asm
> version, but I was wondering if there was an easier way.  Can you count
> interrupt cycles from a program?  They are pretty constant...


References: