[A83] Re: Detecting clock frequency


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

[A83] Re: Detecting clock frequency




>Hi!
>
>I'm new to this list, so I don't know if anyone has tried this before,
>but I wrote a routine to attempt to detect the CPU clock frequency.
>
>It works by sending a command to the LCD driver, and then counting how
>many T-states elapse before the driver becomes ready to accept another
>command. Since the driver will (hopefully) take about the same amount of
>time to recover regardless of the clock speed (about 4us - 9us by my
>calculations), this should provide a reasonably accurate reference for
>calculating clock speed.
>
>The acutal timing is done by copying code to APPBACKUPSCREEN to output a
>command, and then test the busy bit of the LCD driver. Each time the LCD
>is busy, a NOP instruction is inserted in between the output and the
>busy test, and the test is tried again. The number of NOP's required (at
>4 T-states each) to create a sufficient delay, plus about 7 T-states
>overhead gives a fairly good delay timing. I do the complete test 256
>times and take the average, just to be sure.
>
>Unfornunately, since I own only a standard 83+, I have no way of
>checking it works across all calcs (although it does report ~6Mhz for my
>calc).
>
>It would be greatly appreciated if anybody would try this code on their
>calcs, especially owners of SE or over-clocked calcs.
>
>Thanks for any help!

Did you try it yet with different types of batteries?
And ones with much power, or low power?
(maybe you could write a program to determine how much
timer interrupts occur in a second?)

      SUCKER [Pieter Van Nuffel]


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.




Follow-Ups: